My understanding is that it is metaphorical, because nobody else can be a literal God.
It is a word, when using small g, that can mean anything that leads you away from worshipping God.
The Hebrew word is אֱלֹהִים 'ĕlōhîm (plural, as Mike Heiser has illustrated)...and it doesn't mean God our Father.
That is something that has been taught in seminaries around the world for a very long time...and then preached from the pulpit.
Many people have theorized why that was done but the most common reason is probably to remove the paranormal-sounding elements from the Bible so that it was more easily accepted by modern man.
But, unfortunately, changing the message of the Bible to make it appeal to modern man is/was an act of great deceit.
The Old Testament (and the New Testament rests of the Old) tells us quite plainly who the enemy is. And even if modern man has a problem with it, our enemy is quite real and comes from the spiritual realm.