Which circumstances?
Using electricity to create fuels purely for storage is a dead concept AFAIK. eFuels in the medium term will likely only be used where batteries cannot in their current form, e.g. aircraft or shipping. The energy and money cost needed to synthesise on-site with current tech is too high.
But that is not “using hydrocarbons as a battery” as your comment mentioned.