there are 2 ways the way thats intended is to guess when she'll attack and just close the door then or if you have enough power close it until you hear her laugh again which means she tried to attack and you succesfuly blocked it so she moved and you are than safe.
or the unintended way is that in the current update if you just have your camera on the location of her last spot before she attacks it stop her from doing anything and you dont have to be activly looking at the camera
though youll still have to have the power to make it through