And just using
-mempoolreplacement=0
won't prevent it?
No, because mining pools have unconditional FullRBF enabled, and with that any competing transaction that pays a higher fee will replace an already existing transaction in miner's mempool to withdraw a solved puzzle with weak entropy private key. Mining pools have an incentive to enable unconditional FullRBF, so they do it.