LCL is very inconsistent between it's widgetsets (LCL-gtk2, LCL-win32, LCL-qt etc). I experienced this back in 2005 and nothing has changed to date. Hence your IFDEF usage in you code - which funny enough is exactly what LCL is
not supposed to do.
As far as I know the only LCL widgetset that actually supports a usable MDI is LCL-Qt. So maybe you are better off using LCL-Qt on all your platforms, even Windows. But this makes deployment harder as you need to ship extra 3rd party (very large) libraries. Also since about the last 5+ years, nobody is really interested in tackling the MDI issues in Lazarus, so don't hold your breath for any fixes any time soon.
Alternatively, switch to a truly cross-platform toolkit - something fully custom drawn and 100% implemented in Object Pascal. Something that is not just a bad abstraction layer on top of other toolkits. If you do that
you will never need IFDEF's in your application code again. I'm sure you could figure out what alternatives are available to you.