- Check compatibility: Ensure that the self-defined blocks and the model you are copying them into are compatible. Check if there are any version differences or dependencies that could be causing the mask information loss.
- Verify block settings: Make sure that the mask information, including the text for port names in the "Icon" tab, is correctly defined within the block's parameters or properties. If the mask information is not properly set, it may not be preserved when copying and pasting or dragging and dropping the blocks.
- Use block libraries: Instead of copying and pasting or dragging and dropping the blocks directly into the model, consider creating a block library to encapsulate your self-defined blocks. Block libraries help maintain the integrity of the blocks and their associated properties.
- https://in.mathworks.com/help/simulink/ug/block-masks.html
- https://in.mathworks.com/help/simulink/ug/creating-block-libraries.html