I have this problem too on my realm
I got this bug now too. This is what I did:.I opened Minecraft and joined my realm with my world, I first checked out some new things but than I saw some wandering pillagers. I atacked the ones without the banner, after that I dealt some damage to him. The pillager with the banner shot at me and killed itself because my armor had thorns. So i got the bad omen effect. I walked to my place in the world with all my villagers and started a raid. I lost that one en found some pillagers on a roof. I killed all of them and started another raid. I won that raid and got the Hero of the Village effect. I walked around and some villagers gave me items. After that I wanted to try to trade with the villagers with the discount but I did not get the discount. A bucket with a cod was 2 emeralds, with the discount 1, but when I traded with the villager, 2 emeralds were taken from the emeralds I had. After that I walked to my villagers with enchanted books and wanted to trade with them some paper, but I had to give them the normal amount of paper. Then I logged out, restarted minecraft and logged back in. That is when I recorded the video.
Hope you can do something.
-Edit: Video is to big, so I wil upload it to a google drive place and share the link.
-Edit: Okey thanks
Oh, I am sorry for posting a duplicate! That wasn't my intention, I tried searching but couldn't find one.