IPointer events not working for UI objects

For my game I’m runtime instancing text mesh pro objects with IPointer implemented, the event doesn’t trigger tho. I know there’s nothing wrong in the script because it does work when i placed in anyother object, even objects instanced in runtime thru the editor, the problem seems to be specific to objects instanced with the Instantiate call in script. Does anyone have any idea of what is going on?

I solved it by deleting the old prefab creating an identical prefab and assigning it to be the one that is instanced. I don’t why it worked tho.