-Yes.
do I need to switch to H-4 status before my I-20 expires?
-If you use EAD (from your I-485) to work, your status will be AOS, can not "switch to H-4 status before my I-20 expires". If you do not work, you can change your F-1 to H-4. You can continue your Ph.D. study no matter whether your status is AOS or H-4.