I have heard the opposite. Every day you can stop a game from being pirated is quite a lot of sales earned back.
Dunovo has been quite effective at this in the past.
If you can stop your game from being pirated for a week a lot of people who want the game right now will switch to buying instead.
After it’s been cracked a lot of publishers will then patch out the DRM since it doesn’t matter anymore.
This does not happen nearly as much as you think.
For advertising however, you can first of all incur a cost to an advertiser (since costs are calculated per click, view, etc), but furthermore, pirates can even profit from it by having a website and generating fake clicks for that website. If you would not try to prevent this ad fraud you would have bad actors siphoning off complete company advertising budgets to their accounts.
You still need to measure your audience to get advertisers to pay the price, but this is decoupled from the individual ad buys so it can be done differently.
the people buying the pirated software would not have otherwise spent the money on the official/real version. This is the stickler - counting "loss" from this kind of sale is at best immaterial and at worst fraudulent.
Is this like intrusive DRM in PC games, where all the studies show that it increases producer costs and complexity, annoys consumers, and doesn’t actually improve sales revenue, but some companies do it anyway because “what about piracy?”