It depends. The fee applies only if Mozilla opts into the "new terms". You’re right that it if Mozilla chooses the new terms, they have to pay the fee on the app store too.
But they are allowed to stay on the old terms and still offer "real" Firefox. In this case they pay nothing.
"Stay in App Store under the current (pre-DMA) rules, exclusively. Developers that take this option:
Are not permitted to use any of the new business terms available in the EU, but new iOS platform options for the EU, such as alternate browser engines, are allowed. (Because they are required to be allowed.)"
> Nonprofit organizations, accredited educational institutions, or government entities based in the EU that have been approved for a fee waiver are exempt from the Apple Developer Program annual membership fee and the Core Technology Fee.