I've been looking at the part of the code responsible for anti-fee sniping in wallet/spend.cpp. I noticed that when creating replacement transactions via fee bumping, we don't preserve the previous locktime. As a result, the locktime type can change across replacements. For example, if you create a transaction with a time-based locktime and then replace it without explicitly specifying a locktime, the replacement may end up using a height-based locktime. I wrote this test to reproduce the behavior I described.
Initially, I thought this was undesirable because changing the locktime type makes it much easier to identify that we're using anti-fee sniping. The solutions I considered were either not setting a locktime at all or preserving the locktime from the original transaction. I implemented the last approach here.
However, I'm no longer convinced this is the right direction. Preserving the original locktime would effectively disable anti-fee sniping for transactions that already use a time-based locktime. It would also introduce different behavior for RBF replacements depending on whether the original transaction used a time-based or height-based locktime, and I'm not sure that's desirable.