Did your accountant tell you that, or was there even a claim from the IRS?
Unbelievable of course, how to work, cardinally different opinions...
And if you deduct everything as an expense under the agency agreement in the country of residence? That is, maybe even c-corp, but withdraw...