JS only works after selecting an element through the developer screen

I am using document.querySelector(‘#combo_inptxt’).click() to select a dropdown menu, however JS does not recognize the menu until I open the developer and select an element. The dropdown is visually visible but not by JavaScript. It is odd that only opening developer and selecting an element works, while selecting the page itself will not allow querySelector to work. Any guidance is much appreciated.

I have tried window.focus() and trying to change the tabs on the screen because it is on the second tab within a webpage. I have found that I run across this issue as well with Python Selenium since it cannot find the dropdown.