A couple of times over the summer, I have seen other riders in races wearing the green jersey. I was able to reproduce this myself today as well: I managed to score the jersey in Paris and then in the same session clicked on JOIN EVENT to get to the start of a race in NYC and my avatar’s jersey didn’t change to a regular one. I presume this is not by design.
According to the " Segments, Jerseys, and Time Limits" support article (can’t seem to link directly to it for some reason) what you experienced is correct (under “event effects on segments and jerseys”):
If you enter an event with a segment jersey, you will see that jersey the whole event, even if you lose it, unless the event has a specific jersey set.
Gotcha. Seems a bit strange that the leader’s jersey would stay on even when changing worlds but whatever.