To also write it here: Video caching in invidious also caches and reuses data from player so if the player changes the video that is pulled from cache will cause 403s to be returned for videoplayback requests.
Yeah, I should rewrite the URLs during parsing (i.e before caching) not during use.
Continuation of https://github.com/iv-org/invidious/pull/4772#issuecomment-2284243481
@SamantazFox