SigningThe signing of the transaction is done over the entire content of the transaction. Any subsequent changes to the transaction would invalidate that signature and thus the entire transaction.
It should be noted that there are certain cases when the signature is not performed on the entire content of the transaction (a SIGHASH other than SIGHASH_ALL is used). However, these are some specific use cases.