This just happened to me. I'm running GrapheneOS on my Pixel 7 Pro with the Nova Launcher.
When I first came across this issue, I found a thread on here suggesting to disable all Animation Scale options in Dev Options. This resolved my issue the first time.
But it came back recently, worse than before. I am able to reproduce the issue by opening Youtube and having it playing in the background (PIP off) and swapping to another app (in my case, I did it with a game). Swapping back and forth on those two seems to bring the glitch back up, preventing me from switching apps. Seen above, I was able to go to Apps in Settings, Force Stop Launcher (Not Nova Launcher), and the issue resolved. BUT it does come back if I try to reproduce, so its only a workaround for now.