When my stone axe broke with Unbreaking 1 and Efficiency 1, I got it back in the same slot when I right clicked a wooden plank block with a lever on it because I misclicked.
In chronologic order:
1. While chopping trees down, my axe broke on the last log (lucky me).
2. I went to my control panel for flipping a lever to let water flood the ground under the leaves that were decaying.
3. I misclicked and got my axe back in the same slot it was when it broke. (I did not move from slot nor changed something else in my hot bar).
4. The axe displayed that it had 0 out of 137 uses left so I tried chopping a new block of log down which went as expecting with the enchantment.
5. After 1 it again broke and I could repeat the same trick with misclicking on the woodblock with the lever on it.
I tried doing the same a 3rd time and try to record it but that didn't worked.