The secret is that it is being interpreted as an opcode.
Opcodes 0x01 through 0x4b (decimal 1 to 75) are opcodes that specify the length of the data being pushed after them.
This lets you push up to 75 bytes of data using a single op code to specify the length.
Additionally, we also have 0x4c, 0x4d, and 0x4e. These specify:
0x4c - The next byte specifies the ...
The error hints that you're not signing the transaction correctly.
In fact, you're generating a signature with:
txHash := updater.Data.UnsignedTx.TxHash()
sig, err := privkey.Sign(txHash[:])
But the current transaction hash is not what you need to sign. Instead, you should use HashForSignature for legacy input types:
sigHash, err := updater.Data.UnsignedTx....
Yes, it's possible using descriptors and PSBTs.
How to spend/sweep p2pkh UTXOs air-gapped using Bitcoin Core's GUI and PSBTs.
Here are the required steps, most of them have to be entered into Bitcoin Core's console.
export the descriptor of the p2pkh address: getaddressinfo ADDRESS
copy the "desc": "pkh([....", output to the ...