Text Mesh Pro Distance Overlay Not Being Masked

I’m working on rendering the UI on top of everything, and I have a scroll rect and inside it a viewport with a rectmask2d and inside that the content and the scrollbar. Whatever I add in the content from images (with an always on top shader) render appropriately above everything and inside the viewport and is masked outside. If I add a text with distance field overlay, it works fine for the first text and is masked outside the viewport, however, if I duplicate it, it doesn’t work and doesn’t take the viewport mask in consideration. If I create them manually 1 by 1 during play mode, it works so but i do it during edit mode and then play it, it doesn’t work.