Hopefully the boom operator knows what they are doing and are trying to capture the best sound and levels, letting the director know when there are noises that will spoil the shot, and coordinating on shooting locations and blocking challenges with respect to the sounds.
Along with that, there should be a dialog between the location sound person/people/team and the post-production sound person/people/team, such that the location team is aware of what the post team considers to be ideal audio. If the post team wants no major distance changes between lines, then the boom operator should not pull the mic back, but should have the levels on the preamp set to avoid clipping for the loudest sounds. In this situation, the post team A) has a good reason for wanting consistent distance (e.g., consistent background noise level) and B) has a method they plan to use to make it sound right. If the post team wants the most even level or the hottest levels possible for all dialog, then the boom op/location team need to be aware of that and work accordingly.
Note that if you have a two-person location sound team (boom op and recordist), it might be much better to have the recordist (or a very skilled and strong-armed boom op on a one-person team) actually ride the preamp gain a little during recording, rather than moving the boom around too much. When I've been on a two-person team, there was definitely at least a little gain riding for a lot of shots.
If I were doing post, I would want the levels to vary, but not too much. I want more level when people are shouting than when they are whispering, since that will lend the most verisimilitude to the audio. At the same time, in real life people don't suddenly move four feet into the air when someone starts shouting, so major boom moves might sound very fake or unusual. I'd want a compromise between keeping it level with the boom position versus not moving the boom at all. It's good when a post person/team has run location sound and vice/versa so they understand each other's challenges.
During post, I would focus on one of two major ways to deal with varying levels. First off, everything will get some compression on it. Even if I'm trying to deliver a wide dynamic range, I can't think of a time when I've not wanted to compress it at least gently to help smooth things out. After that, it depends on the situation and the shot. If it's two characters and one is shouting and the other is whispering (or something similar), then I'll probably separate the location sound into two tracks, one for each character. This also depends on the video editing, since if the shot is cut back and forth between each character's point of view, I might want to actually set up one track for character A's POV and another for character B's POV. It's an art, not a science.
If separating the audio doesn't make sense or isn't really possible, then my primary way of dealing with varying level is to automate fader moves. Too much compression is not appropriate for sound for video, where the crest factors are kept much higher and viewers have learned to expect that. Even in music engineering, there's no substitute for fader automation on vocal tracks. It's something about the human voice, I guess.
Regarding the recording and engineering of shouting in general, I think right away about a scene from Lawrence of Arabia. Lawrence and his Arab "army" have just crested a rise and have spotted a line of Turkish soldiers falling back after massacring some Arabs. Lawrence was horrified at the massacre and has a chance to exact retribution on the tired Turks, who are unaware the Arabs have come up behind them. He sits up in his stirrups, raises his sword, and screams "No prisoners! No prisoners!". It's a chilling scene, and on the third or so viewing I realized that the audio for the scream of "No prisoners!" is fairly well overdriven and distorted. I feel like that adds to the intensity of the moment, even though it's subconcious for most viewers who are naive about sound production. Of course the distortion created by overdriving the equipment used at that time had a warm and more subtle quality that wouldn't automatically happen with today's tools. But if you have a very hot level and compressing it just makes it sound... compressed, maybe clipping it in a subtle way can maintain the intensity while also taming the level. It's still an art.