@binners – perhaps the cheapest option would be stick with the hardtail & have a 2nd wheelset fitted with slick tyres?
If your route involves a lot of slogging up hills you’ll not benefit as much from buying a more road-oriented bike compared to a flatter route where you can cruise along at pace.
I commute 12 miles each way on my mtb, the only change from off-road mode being semi-slick tyres (Conti Travel Contact Reflex’s) & I adjust the fork settings so they’re pretty much locked out.
Higher gearing also helps a bit – most standard MTB chansets have 42T or 44T tooth outer chainring. I have always used a 46T, with an 11-32T cassette, which suits me very well.
My route is about 12 miles, mildly hilly, takes me about 35-40 minutes depending on my fitness & the prevailing wind. It can also be a very stop-start route due to traffic lights & other junctions, which cancels out a lot of the benefit of a faster road bike.
And I can’t actually afford a 2nd bike anyway 🙂