I have a client that got ensnared in this exact mess, because she bought a condo in 2019, which was owned by a foreign national.
The IRS came after her because the 15% had not been withheld the proceeds.
By the time it came to my attention too many days had passed for me to do anything, especially since it's an area that I have zero experience with.
i sent her to find a real estate attorney with expertise in this area, who was able to resolve the issue.