A* is a modified Best-First search. Where the best is the node that has the lowest (traveled-to + remaining) cost. This means that for the most part expensive nodes will not be exploded, the same with paths that go backwards from your goal.
However, the amount of exploration depends on your heuristic. That is the basis of what makes it good. If your Heuristic isn’t goo, then you will explore more nodes than necessary. A lot more than necessary or a lot less.
This gets into the idea of Admissibility and Optimal.
If your heuristic does indeed render a cost that is <= the best path, it’s admissible. This means that it’s likely to only explore nodes that will lead it to the goal, instead of nodes that won’t. If it’s over, it will explore more of the more expensive nodes. Further, the closer it is to being the exact value, the more likely you are to find the optimal path. If it’s lower, you’re likely to find a path, but not always the best path. If it’s above you’re always going to find the best path.
Heuristic- Result
Actual Best path, not Optimal
= Actual Best path, and Optimal
< Actual A Path (Can’t figure the Optimality, however it’ll be faster than the > Actual).
So A* isn’t magical. It will not always find the best path, will often find a good path in a good amount of time.
Part of the issue that I have with the ‘High’ cost for impassable objects is that it if you make them cost too much, they will be the only part of path that matters in deciding your end point. If you make them cost too little, then your pathfinder will often kick out a path that will go through them.