Enhancement of hydrogenation of CO2 to hydrocarbons via In-Situ water removal