Hello and thank you for your question!
It is true that you cannot be naturalised directly with a residence permit according to §25 (5). As far as I know, however, the years in which you have had a residence permit in accordance with § 25 (5) count towards the corresponding previous residence period (Voraufenthaltszeit) for the German citizenship.
Would you agree with me, dear @mbeon-Éanna?
All the best,
Meike