You are almost there. Trick is that you need to set the focus on the first child of your input element. Here is my working code, where ‘focusonme’ is the class to add to your input-element in StudioPro and you already found the location to put the code:
$(document).ready(function() { //Wait for all dom-elements to be rendered
try{
let inputstextbox=$('.focusonme')[0].firstChild; // find input-element of focusonme
if (typeof inputstextbox !='undefined'){ // check if you have found one
inputstextbox.focus();
}
} catch (error) {}
});
Included error-handling to render unexpected results harmless.