I'll admit I'm not an expert in the specific tax laws related to this industry, but as an accountant I've always suspected these narratives were a myth. The only way it makes sense to me is if the highest marginal tax rate these studios have exceeds 100%, or if they are somehow able to write off more costs than they actually spent somehow. If anyone knows of a specific tax law that makes this work I'd love to hear about it.
There are two other reasons I think are more likely, and the reality could be both.
First, there could be some timing difference where they had amortized some costs over a longer period initially, but are now moving them all to the present. So those expenses would reduce their tax burden this year, but no longer have any effect on future years. Sacrificing long-term benefits for short-term benefits, a common strategy today when corporations seem to be hyper fixated on the next quarter's reports. The confusing part to me is that, as far as I know, this decision is independent of whether they release the movie or not. But I could be wrong there.
Second, this could save additional costs. I'm not an expert in this industry, but I imagine that even after the video itself is finalized and ready to go there are still more costs to be incurred in marketing and distributing it. The money they've spent to make the movie is already gone, so the question becomes do they think that they can earn more money in revenue than what it costs to do all that? Especially factoring in scaling costs. For example, some actors or other credited workers might get royalties in the form of a percentage of gross or net revenue (there are famous examples of accounting tricks being used by studios to screw actors out of royalties by showing negative net revenue for profitable films). It could be that something impacted another adjacent revenue stream like merchandising or a videogame tie-in, that further changes their original profitability calculation.