You may switch back from H-4 to H-1B. There are two items that you need to be aware of. First, make sure that you have time left under H-1B status. You are allowed up to 6 years in H-1B status (with 7th year and beyond allowed after 365 days post PERM filing). Your time in H-4 status does not count towards the 6 year time period. So, first you must make sure that you have time left under H-1B status.
The second item is that only current H-1B workers can change from one cap-subject position to a different cap-subject position and be exempt from the cap. Since you would be coming from H-4 status, you would be subject to the cap if you work for a cap-subject employer. However, if you transfer from your current cap-subject employer to another cap-subject employer, you are exempt.