the Empire ended in 1997 with the handover of Hong Kong
before the EU existed
before the EU existed
(in the same way the United States absorbed the obligations and responsibilities of Great Britain in the 13 colonies)
(regardless, I got my dates wrong, I was thinking of Nice...)