This happened to me in Bedrock 1.21.2 on Nintendo Switch. I had some 10 or so villagers with trades and maybe 15 without trades. I put down a lecturn for one of the villagers and got Fortune 3. I traded one paper trade with the villager to lock the trade. Then I broke the lecturn cuz it was in the wrong spot for my design, and the villager lost its librarian outfit. Then I placed the lecturn down again and it became a librarian with a different trade. When I got a trade I wanted, I traded one paper trade. I then saw it had XP worth of 2 paper trades, meaning XP from both trades were there. It has since kept its trade.
This happened to me in Bedrock 1.21.2 on Nintendo Switch. I had some 10 or so villagers with trades and maybe 15 without trades. I put down a lecturn for one of the villagers and got Fortune 3. I traded one paper trade with the villager to lock the trade. Then I broke the lecturn cuz it was in the wrong spot for my design, and the villager lost its librarian outfit. Then I placed the lecturn down again and it became a librarian with a different trade. When I got a trade I wanted, I traded one paper trade. I then saw it had XP worth of 2 paper trades, meaning XP from both trades were there. It has since kept its trade.