How to properly use focus with several screens (with encoder)

Description

I have 2 screens that I create at boot and then switch with lv_screen_load. Both screens have focusable items like buttons and lists, which are added the default group. I have encoder-based navigation, and turns out encoder switches focus between items that are both on active screen and which are not. As I understand from reading the forum, this is the intended behavior, but it’s not what I want to achieve.

So my question is:
What is the proper way to have focus move only through items on active screen?
Should I create an input group for each screen and manually switch input groups when I switch screens? (What is the best event handler to do this?) Is there a way for input device to pick a group automatically when I load a new screen?
Should I manually hide or make the items unfocusable on unloaded screen? That seems like a bad idea.

What MCU/Processor/Board and compiler are you using?

ESP32/Lilygo T_Display with arduino+platformio

What LVGL version are you using?

9.2

What do you want to achieve?

To have encoder move focus over items on active screen only.

What have you tried so far?

I tried lv_group_focus_obj when before screen is loaded to at least partially solve the problem and move the focus to the newly loaded screen, it didn’t work for some reason.

Code to reproduce

This question does not seem to be code-related, but I can prepare a snippet of my screen creation code if needed.

Memory effective is flush group on screen load and fill only relevant objects.
Second choce is more groups and switch…
Manage this is your code job, i ask same logic for skip group items on other screens , but still not solved.

Thanks! So do you suggest to attach a callback handler for LV_EVENT_SCREEN_LOADED for every screen and modify/switch the input group?