Optimus Prime (IDW 2005) vs Demon King Ghidorah: who would win?

Demon King Ghidorah favored — Slight edge (~55%)

Optimus Prime (IDW 2005) · Transformers · Base

Tier
HIGH 5-A, up to 1-A
Attack Potency
Brown Dwarf Level, up to Outerverse Level
Speed
Supersonic, up to Immeasurable
Durability
Brown Dwarf Level

Demon King Ghidorah · Godzilla · Base

Tier
HIGH 5-A
Attack Potency
Brown Dwarf Level+
Speed
Subsonic, up to Massively Hypersonic+
Durability
Brown Dwarf Level+

A heuristic estimate from normalized VS Battles Wiki stats: tier, attack potency, speed and durability.