All the themes I install have licensing problems
Official Shopify themes should be Null very carefully.

Official themes have their own ID, and there is also a check of parts of the theme code.

Shopify also checks whether any theme has been purchased on your account.

If you have never bought an official theme, then Shopify will detect a hacked theme, but it is not known how long it will take.
There are examples of people working for a year and then Shopify sends them a warning that they need to buy a license. And some people get a warning from Shopify after 3 weeks.