This (Windows employing different methods to prevent users from writing programs that programmatically change application focus) has been an ongoing struggle for me for the better part of 3 years.
I finally made what feels like some significant progress this past week.
If you’ve ever obsessively gone deep down into a hole trying to understand and wrangle weird OS-level behaviors before, you might enjoy this video and feel a vicarious sense of victory :)
Here is an alternative Piped link(s):
https://piped.video/watch?v=VqdUIVxWTlE
Piped is a privacy-respecting open-source alternative frontend to YouTube.
I’m open-source; check me out at GitHub.