OP, delete the game and redownload it. Everyone playing Sonic on Switch has a delay when going into the home menu or sleep mode, but your issue is worse than that. The OS isn't even recognizing your inputs. You're still controlling Knuckles in that video, despite the Power menu being on the screen.
Same exact thing happened to me. I re-downloaded the game when I purchased a new SD card and I couldn't get the game to exit to the home menu or power down. I deleted the file and re-downloaded the game again and everything is "fine" now. I say "fine" in quotes, because there's still a 5-10 second delay when putting the system in sleep mode while playing Sonic Mania and a 2-3 second delay when trying to go to the home menu, but it works.
tldr: Delete Sonic Mania file and re-download from the eShop. Hopefully that fixes it. If not, try it again. If it still doesn't work, pray for a patch soon.