If the EU had a law saying no foreigner could own a house inside the EU, and you bought a house and then renounced your EU citizenship, it would be entirely appropriate that the EU forces you to sell the house or forfeit it.