Another solution came to my mind. You did not mention any details of the room, so I cannot tell if it is doable in your case.
The solution suggested by @WeatherVane is good, IF you change the direction of the airflow, as you stated in a comment. However, there will still be a lot of smoke in the room.
My idea would be to use flexible (maybe even extensible) tubes. Connect one end to the output of the hood, and the other end will dangle near the window. When you want to cook, just place the dangling end outside - and no smoke will travel the room freely.
It will work best if you already have some tall furniture on the wall between the door and the window. Or if you can hang the tubes somehow from the ceiling (or the upper parts of the wall).
You can use some tall supports on the floor (even DIY), to hang the tubes near the ceiling. The idea is applied for the lamp below, to "suspend" the bulb: