It's not possible, here is why:
Chrome DevTools console executes code in the context of the page as you type so for example it executes Object.keys(formEl.elements) and with the results it can show you that formEl.elements has a post and userName property.
Visual Studio Code only shows you what it can statically analyse, and in this case it analyses that formEl is of type Element and not HTMLFormElement cause it doesn't know that document.querySelector('.form') returns a form element so the only autocomplete suggestions are other symbols used through your code.
One way to to get autocomplete is to use TypeScript and define yourself what type is formEl.