If I quit H1B job while H4 application's pending, will I be out-of-status?

Can I remain in the US after I quit my job but before the H-4 gets approved? Will USCIS notify my employer that I’m applying for H-4 so that they can withdraw my H-1B? I don’t want to let them know because they will replace me ASAP.

You are considered on H-1 status until COS gets approved. So you should maintain that status. USCIS will not inform employer about pending COS.