Preferring A to B means that, given the choice between A and B, you will pick A, regardless of where you currently are (you might be in California but have to leave). This is not the same thing as choosing A over B, contingent on being in B.
You can indeed express the latter set of preferences you describe using a standard utility function, but that’s because you’ve redefined them so that they’re no longer intransitive.
Preferring A to B means that, given the choice between A and B, you will pick A, regardless of where you currently are (you might be in California but have to leave). This is not the same thing as choosing A over B, contingent on being in B.
You can indeed express the latter set of preferences you describe using a standard utility function, but that’s because you’ve redefined them so that they’re no longer intransitive.