It is necessary on some gnome and gtk based systems to have some menu items in the popup menu before you show the TrayIcon. That started, maybe, 2 or 3 years ago ?
No current Gnome system will show a TrayIcon unless you have installed an appindicator pugin AND activated it. Messy process.
My advice is to do as little as possible with the TrayIcon. Have an icon visible, when clicked, popup a menu. Do not try to use it for anything more than that.
My application has quite extensive code that determines what Desktop a Linux box is running and then trying its best to do just that display icon, show menu. On Gnome it initially tells user that they may not see the icon, what to install and, if they have installed the plugin, it will activate it. On other desktops it tries to use Ayatanya in some cases, libappindicator in others.
Support for libayatana seems to be flagging, and many desktops are reverting to traditional TrayIcon (but not gnome).
In LCL there are some env vars you can set to force one model or another. See
https://wiki.freepascal.org/How_to_use_a_TrayIcon - probably time for a revision.
Overall, its not good. So, do not try to do things that the TrayIcon was not intended, in the past, people did silly, very complicated things in there and that triggered this current negative attitude to it, particularly amongst the Gnome Developers.
Davo