I was having a big issue with window not being in focused when switching spaces after having updated my mac to Ventura, hence stumbling across this thread.
For anyone who's still having this issue, I've found an indirect workaround by accident today. And after having tested for awhile it seems to fix this issue well. Try download AutoRaise or Yabai Window Manager from Github and see if it solves your issue (I'm only using the first one for now).
Basically what it does is it'll focus on the windows that your mouse is pointing at, which is good for people who have multiple things open in the same window for multi-tasking, and you'd need to click the window to have it focused first before you can do anything with it, which is extremely annoying, and that's the point of these 2 apps. They just happen to also fix the full-screen space not being focused.