I've never been in the military, and don't have much understanding of all things martial, but if I was a platoon commander my orders would be STOP! Get cover and assess the situation. Moving around seems like a sure bet to max casualties. If you can figure out the location of the spotter or the battery, call in something THEY can't effectively counter. Big guns, friendly mortars, airplanes.
If I can't figure out where the misery is coming from, stay put. Sure you'll get hurt, but they will have only so many rounds and when they're out, they'll stop.
I have to think mortars are more an interdiction weapon than a kill weapon. Call in and have another platoon advance on a flank. They can't shoot at both of us. If they shift fire, now we advance. We might displace the spotter and force them to redeploy. They can't shoot on the move.
I remember reading about Tarawa after they got off the beach. The marines advanced under two commands. One used maneuver, fire and assault and got cut to pieces. The other used move until confronted, stop, ID enemy locations, call in naval gunfire, then mop up. Their casualties were much lower.
Apply strength against weakness. If your weakness is being exploited, redefine the confrontation.
Of course, what do I know.