Please run a few more test. I' m almost certain that we will find more issues. Changing something in LCL is always tricky.
Unfortunately you are right.
it seems that program works fine now.
I was wrong. Without WM_SETFOCUS the OP issue is reproduced, but not with TaskBar:
1. Start test program
2. Start another program (Lazarus or Explore, maybe some others, but not all) which overlaps the test program.
3. Minimize that another program.
4. Mouse click the empty space of GroupBox of the test program.
5. Restore another program, then minimize it.
6. See the OP issue.

EDIT: Maybe it is reproduced with clicking taskbar also, but I can't. But this method also shows the OP issue at test program with disabled DoubleBuffered, as KodeZwerg wrote, what I can't reproduce by clicking taskbar.