Are you expecting this automation to turn the light on when the sun is 3° below the horizon and turn off at 22:00?
It wont. That’s not how this works.
The automation triggers only when the sun is 3° below the horizon. That is the only time it runs. That’s your trigger.
If it is between 06:45 and 22:00 when this happens the light turns on. That’s a condition that is evaluated after and only after the automation is triggered. It is not evaluated at any other time.
If you want the light to turn off at 22:00 you will have to write another automation to trigger at that time.