People who play on Ryujinx:
You need to restart the emulator. Activate the codes, close Ryujinx and then open it again.
Encounter Codes and Items dont decrease only work if you do this.
But if the codes dont work after the steps, it's only for switch.