They can’t shut down the satellites over Iran. That’s not how GPS works. They aren’t geostationary with tight beams like comm satellites. Every GPS satellite goes around the earth twice a day and has a beam that covers the entire earth plus something like 10 degrees on the sides out into space (circular, not actually side to side). While the US can turn off broadcasting while directly over very large swaths at a time (like, say, China and Russia), it isn’t actually turned off on the ground because there will still be satellites over Europe or northern Africa that will be on and sending data at a higher angle to that large swath. It will be lower powered in that region because the signal power is lower at the edges, but it isn’t off. Also, Iran is in the same region as US allies and US military bases: Turkey, Saudi Arabia, Israel, etc; so the US would be unlikely to want to lower GPS power in that region.
Starlink is very different in how it sends signals to the earth, which is why it can shut off services to areas.