I want to change an editor text field from a script, while it is currently focused and edited. Essentially I want to make sure that the text field no longer has focus.
You could generally make the UI lose keyboard control focus:
GUIUtility.keyboardControl = 0;