If I earn an income in Dubai as an immigrant (H1B) in the US, would I need to pay taxes on that income at my marginal rate in the US?
US source income is ALWAYS US taxable
Your H1B visa is tied to a location in the US. If you aren't based in the US, it's technically illegal for you to work while on H1B. But temporarily, it doesn't really matter for a few weeks, for instance, on a trip to Dubai and working is okay. Consult your attorney.
If u want to evade the tax, set up the company in dubai free zone, and bill as corp to corp. Dont take the money out. Either use the money as corp expenses or wait until you become non US resident to take the money out as dividend. Thats the legal way.
Global income is taxed in US
For US tax persons yes worldwide income taxable; for H1B they need to pass physical presence test to be a US tax person. But US source income is ALWAYS US taxable is the more accurate statement