Hey Weitentaaal,
If you want to avoid this happening, on newer versions of Lazarus, go to Project Options(Ctrl-Shift-F11)->Miscellaneous->Maximize compatibility..., like you see in the attached image.
This thing has bitten me so many times in the arse, that it's now a tick of mine to turn that on every time I start a new project!!
Hopes this helps!!
Cheers,
Gus