Maternity leave and maternity cash benefit are related but not identical: employment law establishes leave rights, while social-security rules determine payment. EU minimum employment protections do not create one uniform payment formula for every country.
For a cross-border worker, EU coordination generally determines which single country's social-security legislation applies and protects periods and rights when moving. The exact claim still needs the responsible national institution's current rules.