The problem relates to which Desktop (ie, Gnome, KDE, Mate etc) rather that the OS. And, in particular, if your Desktop uses Wayland instead of X11.
Newer Lazarus does have extra smarts to work with problematic Desktops, you certainly need something newer than 2.2.4. But that, alone will not solve all problems.
Gnome in particular is a problem, designers of Gnome declared an end to Tray Icons some years ago. So, now, workarounds are needed. Have you read
https://wiki.freepascal.org/How_to_use_a_TrayIcon ?
Also, if feeling brave, look at
https://github.com/tomboy-notes/tomboy-ng/blob/master/source/mainunit.pas#L539 - function TMainForm.CheckForSysTray() : boolean;
Its quite complicated, you need to test for Gnome, ask the user to install a particular Gnome Extension and enable it.
The TrayIcon does generally work OK on non-wayland systems, Mate, XFCe, Cinnamon etc.
On KDE, I have to force the user to use the right hand mouse button, all down to Wayland I am afraid. But at least no plugin needed, KDE do not seem to deliberately break the SystemTray.
Qt5 and Qt6 generally work better than gt2 but still not perfect every time.
The diversity of Linux is both a feature and a curse !
Davo