OP isn't being as fatuous as some think! This topic merits a 50 page policy explanation from the Home Office so it's not straightforward.
Article 1C of the Refugee Convention provides that the Convention no longer applies where someone voluntarily re-avails themselves of the protection of their home country, or takes up the protection of another - which is why someone ceases to be a refugee if they are subsequently granted British citizenship. If someone is a refugee from Iran, say, and they return to Iran while they hold refugee status then their refugee status will be revoked under part 11 of the Immigration Rules.
Similarly humanitarian protection can be revoked if the circumstances that caused it to be granted no longer apply.
When someone is granted refugee status they get 5 years leave. If they acquire another citizenship or return to their home country in that time their refugee status gets revoked, although they can travel elsewhere on their Refugee Convention travel document.
At the end of 5 years they apply for indefinite leave. If the situation in their home country hasn't changed then they get indefinite leave and a year later can apply for citizenship. If it has then the Home Office decide whether they should be allowed to stay or expected to return, and of course someone who has learned English, got a job, formed relationships etc will be in a better position than someone who hasn't.
Once they have citizenship they are no longer a refugee. Someone who came as a refugee, got citizenship, and then finds the situation in their home country has vastly improved may well choose to travel back for holidays.
As others have said though, Ukrainians were granted leave under a Ukraine-specific appendix to the Immigration Rules so these rules do not apply.