It appears that you can switch the configure.screen multiple times during the execution of each cycle. So if you had this in the main part of your room script... :
configure.screen(0, 0, 0);
animate.obj(o2);
ignore.horizon(o2);
set.view(o2, 1);
position(o2, 20, 20);
draw(o2);
configure.screen(4, 0, 0);
erase(o2);
...then it will redraw a view up in the top non-picture part on every cycle (I'm assuming you've got your picture placed at the bottom of the screen, which is unusual but not undocumented, but doing so allows ego to walk all the way to the bottom of the screen). So if you were to use an animated object to draw graphics in that top part rather than pictures, then you could redraw it on every cycle, which would address the issue of switching to the inventory screen since it would be redrawn immediately after switching back from the inventory screen. In the case of the menu, it clears away the graphics while the menu is active but then redraws it as soon as you close the menu. The call to erase at the bottom will have the side effect of rendering what is called a "save area" to the screen, but thanks to the configure.screen call immediately above it, it ends up drawing exactly what is already on the screen in that position, so you don't end up seeing any difference.
You could even make this animated object at the top move around by explicitly changing its position on each cycle (rather than relying on the AGI engine to do it, which clearly it wouldn't be able to do). The main reason for the erase call is to stop the AGI engine itself from drawing the animated object on each cycle, since it would place it back down in the main picture area, and obviously with it being erased then the AGI engine isn't going to cycle it or move it or do any of that kind of thing. You'll need to handle everything yourself in the AGI code if you want to animate it.