As of the beginning of 2023, jaywalking is no longer a thing in California. The only time a cop can cite you is if you're doing something dangerous. If it's safe for you to cross on a red light, or in the middle of a road not near an intersection, that's legally fine now.
Of course, the loophole is large enough to drive a truck through: if a cop wants to, they can decide you're walking "dangerously" as a pretense to hassle you. And most of the time it'll be the cop's word against yours as to whether or not you were being safe or not, and the courts will always side with the cops absent other evidence.
I always thought jaywalking laws were just stupid. The way I looked at it was always: my parents taught me when I was a kid to look both ways, and only cross if it's safe. To me, that suggests that I should always be allowed to cross if I determine it's safe, regardless of other considerations.
(The history of such laws are quite interesting and -- spoiler alert -- surprise, surprise, they were driven by automakers.)