Have you turned off the Switch for a while and then played some more to see if the issue persists? I haven't played Yooka Laylee on the Switch yet, but I think I had a very similar sound issue one time when I was playing the new Super Smash Bros. Ultimate.
It was a subtle yet completely noticeable crackling under all the sounds/music. I was playing it docked, but the crackling sound also happened in handheld mode when I took it out of the dock. After I turned the Switch off to let it cool down and unplugged everything for several minutes, reconnected everything and turned it back on, the problem was thankfully gone. If you have the Limited Run cartridge version, then I would also suggest removing and reinserting the cartridge for good measure.