If rebooting your Mac doesn’t fix things, see if the problem still happens in Safe mode. It can take much longer to safe boot (10 min) so be patient.
How to use safe mode on your Mac - Apple Support
Start up a Mac with Apple Silicon in safe mode
• On your Mac, choose Apple menu > Shut Down.
• After your Mac shuts down, wait 10 seconds.
• Press and hold the power button on your Mac until the startup options window appears showing available startup disks and Options.
• Select a startup disk.
• Press and hold the Shift key, click Continue in Safe Mode, then release the Shift key.
Safe mode forces the OS to clear certain caches and logs and do other miscellaneous housekeeping. It's non-destructive to user data so is safe to do. Very often certain weird software behavior is corrected by simply logging in this way as a troubleshooting method. When you're in safe boot, the machine will not be at its best performance, especially with graphics, but that's expected.
Does the problem persist while in Safe mode?
Exit safe mode by restarting your Mac normally and re-evaluate the issue again.
If the problem is still unresolved, please return here and post a reply and we’ll see what else we can come up with for help.