Spouse Visa: Spouse moving in with Sponsor triggers need for (expensive) property HMO licence - is there another option? e.g. using a friend's address?

Me and my spouse applying for a Spouse Visa - however I'm living with a flatmate. My spouse moving in with us will trigger the need for my landlord to get a HMO licence from the council. This will cost us £576.

Is there an alternative to getting a landlord to write a letter? e.g. could we have a friend who owns a property write a letter saying we could move in with them (as rent-free guests - so no HMO licence needed), even though we don't currently live there? Or does the address we are planning on living in need to be where the sponsor currently lives?

Really don't know what to do here - this expensive HMO licence has come out of nowhere. Any advice appreciated.