If you set the Alt+Tab Handler to disabled (DisplayFusion Settings > Alt+Tab), so that Windows handles Alt+Tab, do you still run into this issue?
Ok, thanks for trying that! I can reproduce this issue here as well. I'll check in with our developers and see what I can find out.
Quick update! We've found the issue here, and it should be fixed up for the next version of DisplayFusion. Note that the issue will still occur if the script is run from the code editor window, but when you run it with a hotkey it will work correctly.