I think there's a difference in meaning.
If you put the comma behind finally, you're simply listing the things which the dog did, and coming home is the last (final) one of those things. (And that is, I believe, the intended meaning)
My dog ate the rug, ran away, got lost, and finally, came home.
If you say
My dog ate the rug, ran away, got lost, and finally came home.
you're saying that you waited in anticipation for the dog to do all these things before it eventually came home.