I ran into the same issue today, and I managed to fix it. Here’s what I did:
I simply removed the node_modules folder and package-lock.json.
I updated the @angular/localize package to version 19.1.5.
I ran npm i.
After that, I noticed that everywhere in the project where I had import {$localize} was highlighted in red.
So, I removed all instances of import {$localize} from the files. It turned out that all the files containing import {$localize} were causing issues with i18n extraction. Surprisingly, everything worked fine after removing those imports.
I guess the maintainers of the library fixed the issue in this version.