Is your MacBook Pro connected to any of the External Display?
Please check if you have same issue in safe mode:
How to use safe mode on your Mac - Apple Support
Note: Safe mode prevents your Mac from loading certain software as it starts up, including login items, system extensions not required by macOS, and fonts not installed by macOS. It also does a basic check of your startup disk, similar to using First Aid in Disk Utility. And it deletes some system caches, including font caches and the kernel cache, which are automatically created again as needed.
Please try to reset NVRAM/PRAM and see if it helps.
Reset NVRAM or PRAM on your Mac - Apple Support