Was “God be with ye” grammatically correct at the time?

It is an error to believe that ye was only used in the nominative or vocative; it wasn’t. The word ye was sometimes used as the object. The OED says:

3. Used as objective (accusative or dative) instead of you (in plural or singular sense).

And provides many citations, of which these are but a few of them:

  • 1594 Marlowe & Nashe Dido iv. iv, ― For this will Dido tye ye full of knots,··Ye shall no more offend the Carthage Queene.
  • 1613 Shaks. Hen. VIII, v. iii. 181 ― As I haue made ye one Lords, one remaine: So I grow stronger, you more Honour gaine.
  • 1667 Milton P.L. ii. 840, ― I··shall··bring ye to the place.
  • 1820 Byron Mar. Fal. v. i. 198 ― Was not the place of Doge sufficient for ye?
  • 1840 Dickens Old C. Shop lxxii, ― ‘Go thy ways with him, sir,’ cried the sexton, ‘and Heaven be with ye both!’
  • 1847 Halliwell Dict. (1889) I. p. xiv/1 ― I’d soon yarn sum munney, I warrant ye.

Notice how Marlowe even has it going both ways.