Ever since Apple went to the new, animated lock screen I have had trouble switching users on my MacBookPro (13", 2019, Sonoma 14.6.1).
Besides the admin account there are two other accounts that I use for different purposes. If I'm in, say, the admin account, click on the name at the top right...