This is a huge issue solved by following the HOA rules and making sure your tenants do the same. My HOA in DC has a problem with a tenant subrenting on Airbnb possibly without the knowledge of the units owner. All rentals in the building are limieted to six months or more as per the bylaws, so Airbnb is not permited. The tenant / Airbnb host uses a lock box on another building, tells guests not to admit to renting on Airbnb, uses a fake picture of himself, etc. to hide what they are doing. The HOA can only fine the owner, so there is a serious issue between the HOA and the owner, the owner and his tenant, and the Airbnb guests and the host.
Very simple. Follow the HOA and Airbnb rules. If you don't like them, try to have the rules changed, but don't break them until you do.
I fully support Airbnb where it is allowed, but condemn the practice where it is restricted.