You can try this patch.
(function(alias){
Window_NameEdit.prototype.toggleInputMode = function(){
alias.apply(this, arguments);
if(Window_NameEdit._inputMode){
this.$y = this.y;
this.y = (Graphics.boxHeight - this.height) / 2;
}else{
this.y = this.$y || this.y;
}
};
})(Window_NameEdit.prototype.toggleInputMode);