Your problem indeed seems to be the focus of the editor. As soon as you press the button, it is the focused element. Nothing saves the previous position of the cursor. I’m not even sure you can do what you want to do with just a Meta Bind button.
If you want to simply put fixed text after the button itself, though, I can see three solutions for you:
1. The button is at a fixed line
If you are sure the text before the button in the note won’t be modified (which is a pretty strong assumption, I agree), you can use an insertIntoNote action instead of input.
style: primary
label: Test Focus Commands
actions:
- type: insertIntoNote
line: 9
value: "My value"
2. Have some placeholder Obsidian comment to replace
Find where to add the text by replacing a comment (which won’t be visible to the user, but will be to the plugin) using a regexpReplaceInNote action.