I may not understand your issue, but you can close any application even if (in coding terminology) it is not the 'frontmost application', just like you can scroll any window without it being the active window.
For example I have Safari open and that's what i'm currently active with and working in. I want to close iMove while retaining Safari as the frontmost application. You simply just click on the x button of iMovie without even making it an active application, it will close the window NOT QUIT the application.
So, in the scope of your question, if we go back to my example of using Safari, and i have two windows or tabs open and I use the keyboard shortcut command + w or otherwise to close the most active window, because the Application is the frontmost application it will automatically go to the next window of that application to retain intuitive workflow that apple so much loves.
I can't duplicate your error, so it must be a user-end issue. Chrome can't tell your OS how to operate, it can just navigate it's resources.
How are you closing it is the question? Keyboard Shortcut? Clicking the x without making it active? Additionally, where are you closing it could cause the problem, if your closing a full screen window then again, it's automatically going to go to the next most forefront window of that application since its the most active application. Also make sure that you have no hotkeys set to do what your explaining because as far as I know, this is an out-of-the-box feature. It should happen automatically.
Does this video describe your issue?:
Video Link