There is.
after the node with the PIR sensor fires, then put a current state node in with the entity of your light and the “If State” field set to string (az) and value on.
You will now have two exist points one for on and one for off.
Now the question is more with the automatically turning the light off, since you might want to turn it off, if it was turned on by the PIR, but maybe not turn it off automatically, if it was turned on manually.
In that case you can use the current state entity without a state field set and you will get the entire state and attribute settings, where you can make a comparison on values, so you can see if it is the values you set automatically or it is some other values. This assume manually and automatically set different values.
If they do not, then you need to set a helper_boolean up in HA to control when it is set manually.
I suggest you make an input boolean in HA to keep the state of the manual/automatic light control.
Now when you do a manual turn on then set this boolean value to true/on and then you can test on that to see if you should turn off the light manually or automatic.
An input_boolean makes a virtual switch in HA that you can switch on and off when you need it.
The idea was to make this switch show if the light was turned on manually (on) or automatically (off).
You already use call current state nodes and call service nodes, so you already have the skills to use this switch.