another solution with program borderlessgaming :
put folder of program in game folder
make a shortcut of borderlessgaming.exe and put it in game folder
rename shortcut by borderlessgaming.lnk
#SingleInstance Force
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
Run, BorderlessGaming.lnk
sleep 500
Run, game.exe
$Escape::
Send !{f4}
Process, Close, AutoHotkey.exe
Run,taskkill /im "AutoHotkey.exe" /F
Process, Close, BorderlessGaming.exe
Run,taskkill /im "BorderlessGaming.exe" /F
Process,Close,game.exe
Run,taskkill /im "game.exe" /F
ExitApp
return
compil this AHK with visual code and change property of .exe in "administrator" to stop borderlessgaming if this program is in admin mode.....