Bob K, I'm not sure that it's a question of RN owner for the White Ensign and the term HMS. A new ship in sea trial is not flying the White Ensign just because she's not already in service and not because of shipyard property
As for example the three fishery patrol ships are HMS and flying the White Ensign but are not the property of the RN nor the Queen : Her majesty's Ship ??? No it's just a question of serving the RN and not property.
Same for the HMS Protector. The fishery protection ships are rented and VT property, the other one is Norwegian GC Rieber Shipping property and chartered for three years.
Of course a RN decommissionning ship is just a hulk without anythings : red name paint in grey, no pennant number, no emblem on funnel, of course no flags, nor White or Red
There is some exceptions like the Warrior as she's not simply a hulk, so she's now flying the Red Ensign as any civilian ship.
About the Blue Ensign , I do not agree with the Gingyer explanation
They go under the Blue ensign not white as they are classed as naval Auxilliary ships when lauched
The Blue Ensign is flagged only because of the RN or retired RN commanding officer in that case.
Hey hey, I like the OZ who's sank the Perth off Adelaide and the Adelaide off Sydney !
Xtian