Hi,
To use dynamic groups every user in the group must have at least Azure P1 license:
https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/groups-dynamic-membership
See the Note from the beginning of the doc.
Does every user that will belong to the group have at least Azure P1?
Hope this helps!