you can use the command “fullscreen” to switch between fullscreen and window mode.
a quick example:
in your level blueprint:
- from input>keyboard Events add “F12” key
- Add an “Execute Console Command” node
- in command section write “fullscreen”
- connect F12 to Execute console command
now if you run the game you can switch between fullscreen and window by pressing f12
if you connect the console command to “BeginPlay” Event the switch will happen right after you run the game, which i guess is what you want.