You can apply for an EB-5 Green Card while on an H-1B visa. The best option is through a Regional Center investment, where you are a Limited Partner. Therefore, you will continue work with your H-1B employer until your Green Card is ready for processing through Adjustment of Status in the US after your I-526 is approved.
You can first file an I-526 investor Petition and upon the approval of the I-526 Petition file an I-485 Application for conditional permanent residency., while you are working and living in the U.S. and maintaining legal H-IB status in the U.S.
It should be possible, but we would have to review your immigration history and timelines. The only concern with situations like this is dual intent.