when you start your computer, the display uses a very simple driver to get going.
Once you enter your password, it switches to the fully-accelerated display driver, which is much more complex. It also allows any added third-party add-ons to run, which sometimes cause trouble.
To rule out third-party add-ons as part of the problem, restart in Safe mode.
Safe Mode does a number of different things. Hold shift at startup, but have your userid and password at the ready.
A parade of unusual things happens.
• Your Mac loads just enough of the kernel to do a disk check. Then it proceeds to do a disk check. This can take an extra about five minutes.
• your userid and password are required, even if you normally auto-login. So have them handy.
• Your Mac adds ONLY a minimal set of Apple-Only extensions, Not including graphics acceleration extensions. Screen updates will therefore be wonky and slow, but it ultimately should be correct.
• Your Mac assumes defaults for as many settings as possible, including screen resolution. This is the key for re-setting the screen, but there is a little more to it: Resolution is likely to be lower and settings ordinary. Use this as a starting point to customize settings to your liking.
Any changes you make in Safe Mode will "stick" in regular mode after you restart.
• after restart in normal mode, your Mac will take slightly longer to start up [once] because it rebuilds some system caches.
"Works in Safe mode, fails in regular mode" implies "It's something you added".
How to use Safe Mode on your Mac
How to use safe mode on your Mac - Apple Support