When I was looking to purchase SFR investment properties I learned that, at least in our area of the PNW, if a SFR was already being used as a multi-family and there hasn't been a one year or more gap since it was a multi-family, the new owner can continue to rent out both units. We ended up buying 4 two-unit properties in a town with a large renter base (military, college, and medical workers). Note that, though they each had two units, they were officially single family residences.
My story about getting reported to the City for turning one of the houses into a duplex:
We remodeled the apt downstairs in a 2 storey house. It hadn't been used as a rental unit in the recent past, and instead the owner had used it as an art studio. We didn't let that stop us, however. We did some work and turned it into an attractive 1 bedroom/1 bath unit, found a tenant and rented it. We made the mistake of adding an extra mailbox on the street, which is what tipped off a neighbor and they complained. I received a letter from the city and the first thing they made us do was vacate the unit. So my nice tenant moved out and then it took a couple months for an inspector to look at the unit to make sure it was an acceptable dwelling. Afterwards they deemed that it was a fine dwelling unit and said we could rent it to a new tenant, HOWEVER, the new tenant had to be on the same lease as the upstairs person. That small distinction was key to solving the problem.
It worked out that the upstairs tenant had a friend who needed a place to rent, so I created a new lease and they both signed it. They have separate electrical meters, so they pay their bills separately. The arrangement has worked well and is still in place after 7 years!