There are dozens, if not hundreds, of inanimate and male names of RN ships, Blinko, nonetheless they are always referred to in the feminine.
One prosaic explanation is that the gender of the Latin word for “ship” — Navis — is feminine. But people generally agree on the more romantic notion of the ‘ship as a she’ phenomenon: that it stems from the tradition of boat-owners, typically and historically male, naming their vessels after significant women in their lives — wives, sweethearts, mothers. Similarly, and more broadly, ships were once dedicated to goddesses, and later also to mortal women of national or historic significance, thereby bestowing a benevolent feminine spirit on the vessels that would carry seafarers across treacherous oceans. Figureheads on the prows of ships were often depictions of such female namesakes, denoting the name of the ship for a largely illiterate maritime population.