just use lockunspent with "txid":123 to reproduce

"\nExamples:\n"
            + HelpExampleCli("getnewaddress", "")
            + HelpExampleRpc("getnewaddress", "")
        );
    LOCK2(cs_main, pwallet->cs_wallet);
    
    std::string strAccount;
    if (!request.params[0].isNull())
        strAccount = AccountFromValue(request.params[0]);
    if (!pwallet->IsLocked()) {
        pwallet->TopUpKeyPool();
    }
    
    CPubKey newKey;
    if (!pwallet->GetKeyFromPool(newKey)) {
        throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first");
    }
    CKeyID keyID = newKey.GetID();
    pwallet->SetAddressBook(keyID, strAccount, "receive");
    return EncodeDestination(keyID);
}
CTxDestination GetAccountAddress(CWallet* const pwallet, std::string strAccount, bool bForceNew=false)
{
    CPubKey pubKey;
    if (!pwallet->GetAccountPubkey(pubKey, strAccount, bForceNew)) {
        throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first");
    }
    return pubKey.GetID();
}
UniValue getaccountaddress(const JSONRPCRequest& request)