It depends on the moveset but in 9/10 cases the attacker will win. Fast spam skills like water gun will always favor the attacker by x3/4 against the defender since the AI attacks slow.
However if for example the attacker has defensive slow spam skills like Steel wing + hyper beam on his Dragonite and battles a defending dragonite with the same moveset, the defender takes the win since the AI attacks at intervals of 1.5/2s and uses charge movesets at 1.5/2s including hyper beam which gives it the edge.
Slow, and heavy movesets are great for defending.