That's it.
But now... Here we go again, infatuation !
If we want to use signrawtransactionwithkey and we are using the simplest syntax:
So the issue is specific to
signrawtransactionwithkey with TapRoot and not just the goal of signing a transaction?
In that case, although it has the same error, it's not related to your previous issue with
signrawtransactionwithwallet.
Bitcoin Core simply doesn't currently support signing TapRoot inputs with
signrawtransactionwithkey.
Refer to this post:
https://bitcointalk.org/index.php?topic=5462088.msg62647223#msg62647223And issue:
https://github.com/bitcoin/bitcoin/issues/27017