Constraints are not automatically associated it with a module reference block. You need to add the appropriate constraints to the top-level project where the module reference block is instantiated. Associating a top-level XDC to a module reference requires that the file to be scoped to the module. By scoping, you are limiting the XDC to only work on the module reference.
Recommended: Separate these
constraints into another file. The scoping is by-reference or by-cell using the
SCOPE_TO_REF or the SCOPE_TO_CELL property described in “Appendix D, Editing or
Overriding IP Sources” in the
Vivado Design Suite User Guide: Designing with
IP (UG896).
All IP related constraints which are instantiated in a RTL block are automatically inferred and processed.