It's very unlikely you can hear a difference between HD audio formats and LPCM
I‘ve definitely heard a difference between Kodi using LPCM and my UHD-Blu-ray-player sending untampered audio data to my AVR.
It was the same discussion with CD players. Should the connection between player and AVR be analog or digital?
In case your AVR has a very lousy DAC you should use analog. In all other cases the last link in the chain should do the decoding/converting. That generally gives the best results.
The same goes for Kodi. It should leave audio untampered.