You can check the conditions in your automations by clicking on the 3 dots at the right hand side of the condition section to see what the result is of your statement.
That way you can check what goes wrong.
Yeah, many misunderstand the point of view for those terms.
They assume it is a rolling point of view, but this caused a ambiguity.
If you want say an automation to run on a Monday after sunset, then, with this view Monday night at 00:00:01 will meet the criterias, but if the sun sets at 18:00:00, then 18:00:01 will also meet the criterias. Two times a day.
This ambiguity is avoided by looking only at a single day from 00:00:00 to 23:59:59.
Here there will only be one sunrise and one sunset.
So before sunrise means from 00:00:00 to actual sunrise and after sunset means from actual sunset until 23:59:59.
Each one will only occur once per day.
But if you look at them again, then you will see that they can not both occor on the same time, so and AND of the criterias will always fail. The correct use would be OR instead.