Formation of ester during preparation of Fluorescein

I was going through PYQ of JEE where, I encountered the following question:


Q) Phthalic acid reacts with resorcinol in the presence of concentrated $H\_2SO\_4 $ to give :
In the solution provided I realised that conc. $H\_2SO\_4$ was acting as a dehydrating agent and leads to the formation of Fluorescein.


[![enter image description here](https://i.stack.imgur.com/Tti6N.png)](https://i.stack.imgur.com/Tti6N.png)


I have learnt that in presence of an acid catalyst esterification reaction is feasible, then what are the factors that prevent it from happening here ?


Thanks.


