Not sure, if my observations can help.
I use TPageControl much and there Tabsheets. As I thought over to switch from Windows to Linux I spent some time on their behaviour.
Those are done by Windows in a way, that they are arranged by themselves. When there are too many for one line, the line with the Tabsheets is wrapped into the next line.
Not so Linux: There you can shift them from left to right and do not see them all.
You will say: What may this have to do with my thing? I wonder, if the strange box you see may be related with the different way to handle it by operating systems.
If you can, try this: Try the code on Linux, if you run Windows and vice versa. And find out, if the problem persists or modifies or even is gone.