I have a script hacked together to fetch the internal display's brightness once a minute and apply it, with a scaling factor, to the external, so that they're both effectively controlled by the laptop's ambient light sensor. It's really nice for working in a room with lots of windows.
A more batteries-included alternative, which appears to also provide brightness sync, is Lunar (https://lunar.fyi/). I haven't had a chance to try it, but the Github repo makes it look pretty solid.