Homematic Wired Replaced gateway - links still work but not visibla/deletable


I had initially a RasPi with Homegear and a RS485 serial module connecting to the Wired bus.
This worked fine and I created links using “addlink” on the Homegear CLI/RPC to link switches and so on.
That worked well.

Unfortunately, the RasPi memory card died and so the installation got lost.

I replaced it with a LAN gateway and Homegear running as a docker image on my home server.

Devices got detected and paired … I can create new links using addlink as previously.

However, the links created with the old Homegear installation still work, but using getLinks() does not show them in my new homegear installation, nor can I remove or modify them.

First try :
I assume this has something to do with some keys or encryption - replaced old keys and stuff, didn’t work

Did some more testing :
Obviously it does not have anything to do with any keys or something.
It seems like homematic does not scan the devices themselves, but actually only shows what it has cached or saved on the system itself.
I installed RaspberryMatic and it detects all direct links, the old ones from the old homematic installation as well as the new ones created with the new homematic installation.
If I create a new direct link on the RaspberryMatic, it also does not show it in homegear.
If I delete a link that I created with homegear, it actually succeeds, deletes the link, but homematic still shows it in the list from getLinks()