Note: this has technically been the law for a few years but it was not enforced, esp during COVID, nor did many smaller hotels have the software needed to even enter foreign names. Certain chains had a 3 character limit on the name field and because guests legally had to register their ID, they couldn’t accommodate. Other short stay hotels wrongly assumed they needed special licenses to house foreigners like long term accommodation.
Look I’ve encountered this in the boondocks of Hubei in the 2010’s, I’m not surprised this has existed up till now