A better attempt at placing the cursor after math

When math element is closed, place cursor after the element.

When pressing ctrl+M, mathify and immediately place cursor
after math.