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.
All IP related constraints which are instantiated in a RTL block are automatically inferred and processed.