I see. But when I set Groupbox.AutoSize=true in code (activated the commented-out line at the end) the behaviour is correct again.
It was strange, though, that I could not restore the erroneous behaviour any more, i.e. even when I commented out the AutoSize line again I still got the correct behaviour. Only after reloading your original files the error was back.
Looking at the lfm file I saw that you are working at a monitor resolution of 192 ppi, my system is at 96 ppi. So, this issue is related to LCL scaling. And indeed, LCL scaling requires special attention when controls are created at runtime.
In your system at 192 ppi all dimensions are thought to be valid for this specific resolution. In my code I placed the checkboxes at y positions of 0, 20, 40, 60 and 80 pixels, thinking that this is perfect for my screen at 96ppi where the height of a checkbox is 19 pixels (on Windows). But for 192 ppi, this is way too narrow because the height of a TCheckbox at this resolution should by 2*19 = 38 pixels (+/-). But when the Top positions are scaled manually everything should be fine:
[...]
with TCheckbox.Create(self) do
begin
Caption := 'This is checkbox 2';
Parent := Groupbox1;
Borderspacing.Left := 12;
BorderSpacing.Right := 12;
Top := Scale96ToForm(20);
end;
[...]
Scale96ToForm assumes that the provided length argument is valid for 96 ppi and multiplies it by the ratio of the PixelsPerInch of the form to 96.
On my system running at 96 ppi, the situation is a bit more complex because during reading of the lfm file the different resolution is detected, and the central scaling procedure AutoAdjustLayout is executed at the end of the of construction process, and in particular
after the OnCreate handler where the checkboxes are created. AutoAdjustLayout corrects all dimensions in the ratio of the current resolution to the designtime resolution. While the vertical checkbox positions were correct in the OnCreate handler the following AutoAdjustLayout moved them up by 50% (=96/192) - same result as in your case: overlapping checkboxes... But the solution is the same: When I manually scale the Top positions as shown above, everything is fine (BTW, the Borderspacings should be scaled, too).
And why couldn't I restore the error behaviour after uncommenting the "Autoscale" line and then commenting it again? Because the project is saved before running, and and this step the lfm is rewritten with my current screen resolution. Afterwards the dimensions in the file are for 96ppi and the dimensions of the checkboxes are for 96 ppi, too - perfect match. And Scale96ToForm is not harmful either, because it just multiplies dimensions here by 1.