I've often wondered where this expression came from. My affinity for things that make sense found this phrase revolting from the first time I heard it. I can think of some ways to try to make sense of them, but all of them end up seeming implausible, confused, or both.
It could mean what it literally says. Some difference is being calculated. The first might be 13-10 and the second 4-1. They're the same difference, since they're both 3. Is there some difference in common every time this phrase gets used? I doubt it. The difference people are referring to is the difference between the two things being compared, not some difference within each of the two things being compared.
So that leaves us trying to make sense of how the difference between A and B, which is not much of a difference, is then the same difference. The same as what? As itself? That's trivial. There is a difference between A and B, or there wouldn't need to be someone saying that they're somehow the same. Yet what's this difference the same as? If it's saying that they're the same and also not the same, then that might make some sense of this, but they would have to be the same in one sense and not the same in another sense for this to have any meaning at all and avoid contradiction. I don't think most utterers of 'same difference' are thinking on this level of things being the same in one sense and different in another.