Correct. That is using 'in-character' knowledge to make tactical choices. Which is fine. Some enemies might not make that same assumptions.
And Heavily armored guys who cast spells are not he only people who can do the dodge action, though. That said, being all 'dodgey' is probably pretty obvious and if your DM is always going to avoid the dodging PC then it's the best tactic to avoid getting hit, but not your best tactic as a tank. So then it comes down to how well your players can read their DM.
I'm not confused on how sanctuary works. If an enemy uses all its movement to approach and attack and then, consequently fails its save, and has no-one else to attack, it loses its action because it has no more movement and no-one else to attack.
I don’t change tactics based on ooc info. If I can help it. You are free to do it any way you like.
To me, if I cast sanctuary and the enemy avoids attacking me and attacks our wiZard instead, I’ve just wasted a spell slot. I should have just cast it on the wizard.
You say that, but in your example of displeasure how did you know who the Ankheg was going to target? If you didn't have an in-character reason to be sure the Ankheg was going to target you, you had no reason to expect it to move 30' to attack you and then waste its attack if you cast sanctuary on yourself. And in your other objection (the second quote above), how would you know that the enemy was going to move 30' and attack the wizard instead of you so that you could cast sanctuary on him instead of you to force it to waste its action? When you spread your party out at least 15' from each other and all 30' away from the enemy and cast sanctuary to force the enemy to waste its attack if it charges a particular party member, you're either gambling or need to know who it's targeting in order to sanctuary the right person.
You're saying that you don't use OOC info to make your decisions, but your examples rely heavily on you using OOC info to make decisions as far as I can discern. If your party really does keep up mind reading abilities on giant insects then that's pretty unusual and kind of impressive, but if not then you don't have any way to get IC knowledge of who the enemy is going to target, so your sanctuary use actually does rely on OOC information.
Edit since it might not be clear what I'm getting at: Your objection to the sanctuary situation is that the DM used OOC knowledge to change the target of the Ankheg, which you feel made you waste your spell because your plan was for the Ankheg to come to you, attack, and (on a failed save) waste it's action. But the plan that was 'ruined' also relies on what appears to be OOC knowledge , so objecting that the DM used OOC knowledge to derail a plan that only works based on your OOC knowledge is rather hypocritical, and undermines your claim that you don't use OOC information yourself.
You going on huge tangent. Is there a reason? You are taking a totally random example I used to make a judgement on how I play the game and calling me a hypocrite. Is there a reason why you are making personal attacks instead of talking about the ‘usefulness of the dodge action?’
You going on huge tangent. Is there a reason? You are taking a totally random example I used to make a judgement on how I play the game and calling me a hypocrite. Is there a reason why you are making personal attacks instead of talking about the ‘usefulness of the dodge action?’

(Dungeons & Dragons)
Rulebook featuring "high magic" options, including a host of new spells.