Weird camera snapping but only once per pressing play

Godot Version

v4.6.2

Question

why does my mouse controlled camera always "snap" orientation upon the first few mouse movements every time pressing play?

apologies in advance if i get any formatting wrong, this is my first time submitting.

i took and modified some code for a mouse controlled camera. it works as expected except for how every time i press play and run it, the camera will “snap” pretty early on, and then just. never do this again per run. this does not happen with no movement, occurs whether the game is running embedded or pop up, or whether my cursor starts over the game window or to the side.

since im a new user i cant upload the video attachment directly, but heres the imgur link: https://imgur.com/KDc2RvR

thank you in advance, also replies may be a little delayed given my life circumstances

EDIT: somehow forgot to add code at first. adding.

the camera is parented to the node this script is on, and connected in the export.

I think this may be because the game is just starting, so theres delay or lag, the only thing i think you can really do is optimize, this shouldn’t happen when the game is exported from the engine