Sprite flickers through top layer while moving

Hi RM community! I am trying to simulate a live chat scrolling up one side of my game screen using pictures of chat messages, and I want to understand if this visual bug is something I've set incorrectly or just how the engine works. In the video below, you can see the line of text briefly pops through the tent tiles each time it moves:



Details:
-Tent tiles are set passable, priority 5, no flags, on layer 3
-Each chat graphic is 5 tiles tall (text is at the top), only direction fix is checked

Any insight is appreciated, thanks!
Your chat graphic is a character sprite? Why are you not using the Show Picture event command?

This is the intended behavior of RMXP. Event graphics and the tilemap reside on the same Viewport. As the event moves up/down the screen, its Z-value updates. Tile Z-values are defined as follows (excerpt from the Help Docs):
Tilemap
The Z-coordinate of each sprite used to create a tilemap is fixed at a specific value.
  1. Tiles with a priority of 0 always have a Z-coordinate of 0.
  2. Priority 1 tiles placed at the top edge of the screen have a Z-coordinate of 64.
  3. Every time the priority increases by 1 or the next tile down is selected, the Z-coordinate increases by 32.
  4. The Z-coordinate changes accordingly as the tilemap scrolls vertically.
Keep these rules in mind when setting the Z-coordinates of any map characters.
If you use the Show Picture command, those reside on a different, higher level Viewport, so it will always show over the map.
Thanks for the response! I actually don't want the chat graphics to be above the map: they are going to be part of a Twitch-style UI that frames the rest of the map, and the tent represents part of the Twitch interface that the chat graphics should disappear underneath as they reach the top of the screen. I was avoiding using Show Picture for anything because I could see the picture pop in a split second after the map loaded, and I wanted to keep my map transitions as smooth as possible. Admittedly this is my first RPGMaker project, and I don't know best practices for anything yet, so this was the first solution I came to that was quick to implement.
...
OK, halfway through responding, something you said gave me an idea, so I tried using Show Picture to put a picture of the tent on top of the tent tiles. That does hide the picture pop-in, as well as prevent the chat graphics from flickering through the tent when they move up. Unless there's a simpler, more elegant solution I should know about, this is probably what I'll run with moving forward. Thanks again for your help!

Original thread: https://forums.rpgmakerweb.com/threads/sprite-flickers-through-top-layer-while-moving.171745/