expression
when about to go back; just before leaving
Refers to the moment right before departing from a place, often used when something happens at that time.
帰りしなに、忘れ物に気づいた。
Just as I was about to leave, I noticed I'd forgotten something.
expression
on the way back; on the way home
Describes something that happens during the journey back, not necessarily right at departure.
On the way home, I stopped by a convenience store.