Why is 了 placed after the object in "你回英国了吗?" and “我去上海了"? In the following sentences, why is 了 placed after the object?

马大为：林娜，早！好久不见，你回英国了吗？
林娜：我没有回英国，我去上海了，昨天刚回北京。

I have looked at a Grammar Wiki page on when 了 can go after the object, but none of the reasons given seem to explain what is going on in these two sentences.
Wiki page: https://resources.allsetlearning.com/chinese/grammar/Advanced_%22le%22_after_an_object).
In those sentences, it's a modal particle, in which case it expresses a change of state. The page you linked has a link to it.
A change of state doesn't necessarily mean an actual physical change. It could be implied, or it could be a change in one's assumptions.
In your example sentences.

你回英国了吗

Here the change implied is from a state of being in England to a state of not being in England. Yes, it is backwards (!). You have to interpret the sentence from the point of view of the speaker. The first character Ma Dawei is seeing Lin Na after a long time, and he thinks: &quot;I haven't seen her in a long time, she must have gone back to England&quot;. But obviously she's not in England anymore, since Ma Dawei is seeing her right now.
So the change implied by Ma Dawei is that Lin Na used to be in England and now she's back to Beijing.
Lin Na then replies:

我去上海了

This change could be relative to two things:
One, it is relative to Ma Dawei's assumption. Lin Na says: &quot;I didn't go back to England, (instead/actually/in fact) I went to Shanghai&quot;. Using 了 here stresses the fact that the actual situation isn't what Ma Dawei thought.
Or two, it is relative to the change in location, i.e. she was in Shanghai but she is now back in Beijing. The reasoning is similar to the previous sentence uttered by Ma Dawei.
I interpret Lin Na's sentence as the latter possibility, but one could make a case for both.