Magic. Specifically divination magic.
Consider a zone of truth spell. The caster automatically knows whether the being in question passes or fails the save. Keep casting until they fail. Tiamat, for example, has a Charisma score of 29, for a total modifier of +9; she is not proficient with Wisdom saves. Presuming other deities are of a similar nature, that's d20+9 vs a DC of at least 8+5+6 = 19, meaning about half the time, Tiamat fails. We can thus assume that, for most deities, even if they cannot willingly fail the save, they will be very unlikely to pass it four times consecutively (and this could be improved further by using a powerful focus that adds to your DCs, having someone debuff the deity's saving throws, etc.)
At that point, they cannot willingly lie. Ask them if they are, in fact, a transcendental being, not simply a powerful supernatural entity, but whatever standard you prefer for something to be "actually a god" and not merely a "slightly more powerful entity." If the deity answers "yes" while affected by zone of truth, you then know that at least the being itself has no reason to doubt its own divinity.
First yes, if the deity answers, which it need not do.
However if it does it also might consider itself to be a transcendental being under a different definition of transcendental being from yours. An answer of "yes" could be because of course, everyone is a transcendental being. If you asked a dragon if it was simply a powerful supernatural entity its answer might be no.
"An affected creature is aware of the spell and can thus avoid answering questions to which it would normally respond with a lie. Such a creature can be evasive in its answers as long as it remains within the boundaries of the truth."
Defining divinity can be notoriously difficult.
From there, other divination magic to suss out the deity's origin. If they're not lying when they claim divinity, either they are crazy, honestly mistaken, or actually divine (Lewis's trilemma). Since insanity is usually not that difficult to identify from behavior, I think we can safely set that aside (some deities will of course also be crazy, but for the sake of argument, presume we keep looking until we find a being-claiming-to-be-a-deity that does not evince insanity.) That leaves an honest mistake, or a genuine truth. Divination magic can conclusively distinguish the two.
The other divination specifics seem key here. Not sure why you would bother with zone of truth if you have another divination that can determine the genuine truth straight.
Maybe Commune would be the best bet. Directly ask your god if they are a transcendental being. You will receive a correct yes/no answer, or unclear if it is beyond the deity's knowledge, or a short phrase if a one word answer would either be misleading or contrary to the god's interests (Tiamat might answer "Poor choice of questions, cleric").
So if it is within the god's knowledge and a yes/no would not be misleading or contrary to the god's interests you will get your yes/no answer. There is quite a lot of wiggle room in there to get to a phrase or unclear though.
COMMUNE
5th-level divination (ritual)
Casting Time: 1 minute
Range: Self
Components: V, S, M (incense and a vial of holy or unholy water)
Duration: 1 minute
You contact your deity or a divine proxy and ask up to three questions that can be answered with a yes or no. You must ask your questions before the spell ends. You receive a correct answer for each question.
Divine beings aren't necessarily omniscient, so you might receive "unclear" as an answer if a question pertains to information that lies beyond the deity's knowledge. In a case where a one-word answer could be misleading or contrary to the deity's interests, the DM might offer a short phrase as an answer instead.
If you cast the spell two or more times before finishing your next long rest, there is a cumulative 25 percent chance for each casting after the first that you get no answer. The DM makes this roll in secret.