I’d class it as unexpected behaviour in that you might expect focus to follow note selection, especially if you only ever use map view as (manually) you select a container in order to drill down to it. So it is intentional: you’ve set text pane focus to a note outside the current map (whose purview is a single container). Your implied expectation is that map view would also shift.
My recollection—can’t bring exact steps to mind—is similar occurring—not necessarily in map view—in general use, i.e. not scripting, when using Find.
However, if you were expecting the above code to also set focus there may be some extra AppleScript needed (either existing or additional AS function needing to added).
So, bug/not bug is less the question as one of, if scripting as per your example should the view pane shift focus so the selected note is in scope of the current view.