There isn't any clear explanation for this within the movie itself, nor am I aware of any official word on this anywhere else.
In the comics though, Peter's spider-sense is said to trigger an instinctive response from his body, allowing him to avoid danger without making any conscious decisions.
Spider-Man's spider-sense is an instinctive response to danger which always triggers his amazing spider-like reflexes in plenty of time to avoid injury! He moves so fast that he can usually dodge a blow... before it is thrown... which explains why it is so rare for anyone to ever hit him!
In fact, directed solely by his spider-sense and without making any conscious decisions, our hero has been known to avoid prolonged bursts of machine-gun fire... and computerized, rapidly-fired, random discharges from the Hobgoblin's finger-blaster!
Of course, since his spider-sense is an instinctive reaction, Spider-Man can disregard it... but that takes a lot of effort, a conscious decision, and a heck of a good reason!
Amazing Spider-Man Annual Vol. 1 #23 (September, 1989)
As you mentioned, there were transparent, wavy lines around the head of Peter's astral form, in the relevant scene from Spider-Man: No Way Home, suggesting that his spider-sense was a factor there.
Also, when Doctor Strange's astral form left his body during his fight with Lucian Aster in Doctor Strange (2016), a heart rate monitor indicated that his heart was still beating, despite his physical form and astral form being separate. His heart rate did flatline at one point, due to a stab wound in the chest he'd received during the fight, but Christine was able to use a defibrillator to get it beating again, before his astral form re-entered his body.
This suggests that a person's physical form retains some degree of autonomous function in the MCU, even when separated from their astral form.