Will my OPT get rejected if my passport was expired for a time?

My I-94 is linked to my old passport number which got expired while I was in the US on an F-1 visa. I got the passport eventually renewed. I’m going to apply for OPT soon. Is there a chance that USCIS would reject my OPT application because I lived in thee US for a few months with an expired passport?
Remember that I-94 expiration date is D/S for F1 visa.

Well, it is hard to say. You technically did not had valid status. If your I-94 had an expiry date and you were in US with expired I-94, then it can be tricky.
Talk to your DSO and then take necessary action. Sometimes, it can be better to leave the country and re-enter to avoid any issues. Discuss with an attorney on this and then take a decision.

I-94 expiration date is D/S. it has nothing to do with passport validity, unlike H1B

Sometimes, the CBP officer gives the I-94 even for F1 with an end date instead of D/S, that’s why asked…In any case, it would be hard to know…talk to your DSO