They try to protect against that by requiring that you can only get policies on something you have an "insurable interest" [2] in (i.e. independent reason to value it and not want the insured event to happen to it).
They also try to closely calibrate payouts so that they're not significantly more than the market value of the loss (ideally, a bit less) and thus prevent the "moral hazard".
Yes, sometimes you can get ahead of them and get a policy paying $X where X is significantly greater than the actual value to you, and have an expected value (profit * probability - costs) greater than zero. But you will almost certainly have to commit insurance fraud to do so, by hitting one of many "tripwires" that the insurance contracts have: lacking insurable interest, misrepresenting market value, actively causing the incident yourself, etc. [3] Any of those would give them an out.
[2] https://www.investopedia.com/terms/i/insurable-interest.asp
[3] My comment on a similar story where the same logic applies; in that case, the fraudster exploited the fact that they weren't charging enough to cover the probability of the event, and insured events she didn't have an interest in: https://news.ycombinator.com/item?id=23528221
So the fraud is really misrepresenting what you lost, not insuring it for a set value when you buy the policy.
Airplanes and collector cars do not have a readily available source of "comps" to determine value and in both cases, the cost to recreate a given condition is typically higher than the value of that car/airplane in the open market. I can have an airplane that is "worth" $250K to me, that I could only sell for $200K, but that would cost $300K or more to recreate exactly by starting with an available airplane and re-customizing the avionics and airframe mods exactly. In such a case, I can probably get a policy written for any agreed value as low as I want (at the risk that I'd get cut a check for that amount and have no airplane in the event of a loss) and pretty close to $300K.
That's why I argue and can debate #3. I'm not an expect, I don't know how it works, this was a waaaaay ago (2015.)
So, you know, my personal anecdote changes perspective and that sort of mindthink.