You jumped to conclusions, sell it because the insane hassle, changes in laws will make more hassle.
For over 15 years I had to rent due to being on a low income with gaps between contracts (academic research scientist). I saved up and bought a suitable house and now share it with lodgers to pay off the mortgage. After saving up for many years I had to complete in a rush because the local rules were suddenly changed (Article 4 declaration by the Council); that means that after a certain date you could not set up a new HMO without planning permission (which you will never get in my area - NIMBYs). I got the HMO set up with tenants in place 3 days before the deadline passed and afterwards got a certificate of lawful use to prove that it has C4 status. I was told at the time that doing that had added about £50,000 on to the value of the house.
I have followed all the numerous rules regarding HMOs since the start: fire doors, 30 minute fireboard enclosures as required, mains powered inter-linked smoke/heat detection system with battery backup, emergency lights, fire extinguishers/fire blanket, fire alarm inspections, gas safety inspections, PAT testing, electrical safety testing, HMO license (the last now costs >£2,000 for 5 years).
My tenants are glad to be there as they save thousands of pounds compared to the alternatives. The cheapest university accommodation costs around double what I charge. So no, I'm not going to sell up without a fight and certainly not when the housing market is in the toilet.