🟠Major
Temporary relocking can downgrade persistent locks (src/wallet/wallet.cpp:2536, head)
insert_or_assign replaces an existing true persistence flag with false. This can happen when fundrawtransaction uses lockUnspents on an explicitly selected input that was persistently locked, because that caller invokes LockCoin(input, false) without excluding existing locks. If the input is later spent, AddToSpends calls UnlockCoin, which uses the in-memory persistence flag to clean up the database. Since the flag is now false, the LOCKED_UTXO record remains and the lock can return after a wallet reload. Preserve persistence for existing entries, for example by combining the flags with logical OR, while still allowing a non-persistent lock to become persistent.