In a recent volume arguing for an earlier dating for the book of Deuteronomy than usually believed by many OT scholars, Josef Schubert wrote that, in the theology of the Decalogue, the ontological existence of other gods was assumed, not denied:
The first law of the covenant is this: “You shall have no other gods before me” (Exod 20:3). Monotheism does not deny the existence of divine beings. The Pentateuch acknowledges the existence of other gods, but forbids Israel to worship them. The biblical person does not meditate on the nature of God or other supernatural beings. The Decalogue does not deny their existence. I assume that the people of the biblical world believed in the existence of a supernatural universe which is not subject to the laws of physical nature and interacts with the happenings of the natural world, occasionally benevolently, often maliciously. They believed in the existence of divine beings (elohim, referred to in the plural), the whole host of heaven, who will hinder or promote happiness. They also believed that this supernatural world is strictly ruled by universe laws. They believed in the power of amulets. The magician knows these laws and can apply them. Pagan gods too are subject to these laws. YHWH, however, is always described as supreme, other elohim being subordinated to him. The Decalogue does not state: “believe in the existence of YHWH,” or “don’t believe in the existence of spiritual beings—ELOHIM.” Such statements would be absurd. (Josef Schubert, Dating Deuteronomy: The Wellhausen Fallacy [Eugene, Oreg.: Wipf and Stock, 2018], 96)