I feel a lot of these responses miss the mark. If I read it correctly, you suggest matrix is the data leak and the results of which show in Instagram.
Matrix has many clients, one of which could be leaking data, but not necessary from your end of the conversation.
There are also keyboards which analyze input, and high privileged apps that can read notifications.
From what I understand, Meta apps can scan a device for a list of apps installed (probably somesort of fingerprinting concern) but can't actually read app interactions or content.
I'd say hi in a chat with some clear, unique keywords on a new or old/wiped device and see if the leak continues. It may not be you at all, but it would identify the problematic device