You know that one person is not allowed to be on more than one nonimmigrant status. You cannot be on both F1 and H1. When you were on F1, you are allowed to work for both companies based on OPT. When you were on H1, you can only work for the sponshored company. Regularly, an action occured later overrides an action occurs early. In your case, your H1 approval will invalidate your F1 status. Theoritically you were out of status for four months. However, such a default rule is not absolute. Depened on you situation, you may argue that you were still on F1 for the four monthes and your H1 started later. Sometimes,it works. In case such a strategy does not work. Out of status for four months is not a big deal. It is unlikely that the issue will affect your future 485 significantly.