Hi i had the same issue,
my problem was , i have multiple levelSequencer, and when i try to render one of them, sometimes the camera and shadow was not right.
it was becaus i had on my world outliner a levelSequencer player set on my master sequence and it was set in autoplay.
i just delete it and it render correctely (4.26)
Have nice day
Daniel