I first tried to use $pane->gridPropagate(1);
before mainloop but it does not change anything.
I also tried $pane->pack(expand => 1, fill => both ); but it worse: nothing is ever displayed.
It is a long time I have no using Tk so some people surely kwow better.
Good luck.