Oof. Sometimes.
I think about this situation a lot and how to avoid it.
We're playing a game of modern day secret magic. The players are looking for another group of NPC mages. They learned that they left the city, and wherever they are they are warded against magic generally and teleportation/scrying magic specifically.
The players decide to try to teleport to them. I say ok, but it's going to be difficult. I lay out the dice targets. They spend a bunch of time figuring out their dice pools and what bonuses they can get. They make the roll. They fail. Like, it was plausible they would win the roll with all their bonuses, but the dice did not bless them.
We move on a little. The next week, for Player reasons, they decide to try again. They go through the whole thing, spend more resources, and roll the dice. I tell them it's the same odds as before. I make the opposed check. Players fail again.
The player I liked least gets frustrated. "I don't understand what we're supposed to do! How are we supposed to find these people??"
I'm like "do you want a hint?"
They're like sure.
I go, "You could call them on the phone."
Dumbfounded.
"You could also ask their friend for the address of their safehouse she mentioned. She's been helpful so far."
"Oh."
In the game I started after, I brought this up in session 0. I framed it as "if something is opposing you, attacking it's strength is probably not going to work well. Like if there's a bouncer whose sole role in the world is to keep people out of the bar, asking him nicely to let you in is not likely to work. That's exactly what he's strong against. A bribe, a distraction, sneaking in, a fake VIP identity all have better shots than just asking nicely.
Or in other words, don't cast fire spells on the fire elemental."