@Artem-Romanko ,
Can you tell us what version “several versions ago” was?
I just tried v8.1.1 (most recent), v7.9.5 (3 versions ago), and v7.9 (5 versions before that) – and all of those have the behavior you describe: if I had a session with several files open (say 5), and had last activated tab3 then tab5, then closed with tab5 active; if I reopen Notepad++ with that session (so that tab5 is open), if I Ctrl+W, it switches back to tab1.
So I cannot replicate the behavior you seem to be expecting from an old copy; and without that, I cannot look into the “why” of the change (and I doubt there will be a workaround to activation order from one session to the next … but I have been proven wrong on such things before).