"Stage Manager: Turn recent Apps On/Off" unwanted window switching

UPDATE: I digged the plists in `~/Library/Preferences and found a way to do it manually. See my next message.

I've been trying to use "Stage Manager: turn recent Apps on/off" effectively.
While it does toggle the visibility of the recent apps, it also keeps cycling through my windows (aka stages) as well.

Is there a way to only toggle the visibility of the stages and leave the current window still?

Here are screen recording to make it clearer:

BetterTouchTool behaviour:

Expected Behaviour:

I've been looking for a way to make this manually with Applescript or bash as a workaround but haven't found any infos on how to control stage manager with scripting. If anyone knows I'd be happy to hear...

Turns out the stage manager plist is ~/Library/Preferences/com.apple.WindowManager.plist

With this command I get the behaviour I was looking for:

defaults write ~/Library/Preferences/com.apple.WindowManager.plist AutoHide -bool $([[ $(defaults read ~/Library/Preferences/com.apple.WindowManager.plist AutoHide) -eq 0 ]] && echo true || echo false)