Carelessly roaming around the public square, I strayed off the way home.
Can I paraphrase it like this:
Carelessly roaming around the public square, I strayed away from the way home.
English Language Learners Stack Exchange is a question and answer site for speakers of other languages learning English. It only takes a minute to sign up.Sign up to join this community
Stray off X is not really a phrasal verb, it means what it says literally. One typically strays off a known path, course, or defined area.
So by saying this:
I strayed off the way home.