i had boots on with protection 4 feather falling 4 unbreaking 3 depth strider 3 and mending, i got boots with protection 1 and thorns 1 from villager trading, i right clicked with them in my hotbar and the same enchantments that where on my boots i had on where applied to the boots i got from villager trading.
-the items keep durability
how to reproduce
have enchanted boots on (don't know if it happens to other armor pieces but i would thinks so) then have enchanted boots in your hotbar and right click with them in your hot bar.
this bug occurred playing on a sever with bedrock dedicated server while playing on windows 10 desktop
Are you sure you didn’t just switch boots that you had equipped? Right-clicking an armor piece in your hotbar should equip it, and if you already have a piece of that type equipped then right-clicking will swap that one with the one in your hotbar.
Edit: tested this again today (4/13/20) and boots swapped as expected. This ticket will be closed as "unable to reproduce."