I see this line on the Form I-765 instructions
If you have filed your Form I-485 with EOIR, you must submit proof that you are currently in immigration proceedings, that you have filed Form I-485 with the immigration court, and that the Form I-485 remains pending, before filing Form I-765 with USCIS.