My cat acts this way when she gets in a special hunting mode. This could be something like a small fly too the other day it was a moth. If she can’t catch it or suspects there might be more “invaders” she hides and waits. Hiding is also hunting behavior you know. Rarely if she got scared over something outside. Once it was an aggressive stray cat she has never seen before. The cat didn’t interact with her but she saw him chasing another cat.