I understood the root cause!
It happens when changing the font size of the tab headings.
See this example:
ui = require 'ui'
local WIN_WIDTH = 1018
local WIN_HEIGHT = 835
ui.theme = 'dark'
win = ui.Window('TEST CASE', 'single', WIN_WIDTH, WIN_HEIGHT)
tab = ui.Tab(win, { ' ONE ', ' TWO ', ' THREE ' }, 5, 5, 760+130, win.height-10)
--> tab.fontsize = 12
tab.fontstyle = {bold=true}
t1 = tab.items[1]
t2 = tab.items[2]
t3 = tab.items[3]
win:show()
repeat
ui.update()
sleep(1)
until not win.visible