I tried 2 different monitors and it's the same thing. When in clamshell the monitor is brighter, and when MacBook is open the external monitor is dimmer. Anybody else has the same issue? I have a MacBook pro 13' 2019
Might be the "Automatically adjust brightness" setting is enabled? I believe that's only supposed to affect the internal display, but maybe it applies to all connected monitors when the laptop is opened, allowing the light sensor to work? Just a guess- My external monitor does not change brightness regardless if the laptop is open or closed. Could be True Tone too.
"Automatically adjust brightness" does seem a likely culprit.
Another possibility: MacBooks have different brightness settings for when plugged in and when not. Try setting those to the same value (note down the original settings first) and see if it still changes. That will at least see if that is the issue.