you'll most likely need to use -zapwallettxes command line argument
Actually that is no longer available starting with Bitcoin Core 0.21.0,
as you can read here.
The new option available is
abandontransaction (but I still have to read myself more on that)