How do I prevent updating state/re-focusing after dispatching a transaction?

How do I prevent dispatching a transaction from updating the document state and setting the cursor at the last node in the document? The transaction is inserting text.

Updating the document state seems a reasonable thing for a transaction that inserts text to do. I’m not sure what you mean about setting the cursor at the last node—that should only happen if your transaction moved the actual selection state there.