Do video containers influence the video quality? https://en.wikipedia.org/wiki/Comparison_of_video_container_formats

Understanding containers and codecs

I'm just confused because the information above seems to indicate containers are simply chosen based on what codecs you want in your video, and that they are independent of the actual output which is determined by the codecs.
But then why is it when i output a h.264 in an .mp4 container the quality is much worse and shading different than h.264 in an .avi or .mkv?
And  if there is a reason is there a table or compilation somewhere showing this kind of information for each container so I know short of trying them all?

Extra
I ask because I'm trying to find an acceptable container to hold a .wav32 (or mbe .wav 16bit signed) and 4k h.265 video that will be supported by youtube specifically in this case, .avi isn't working. .mkv isnt listed as beings supported but does upload. it seems to be the same as a working .avi, but I don't pretend to understand what's really going on....it re-encodes anyways so its irrelevant so long as it seems to be the same as a supported format..?
People say to convert .mkv to mp4 but I don't see any reason why....mkv supports going to mp4 without a re-encode but whyyy would you limit your audio options and do so....? Especially when mp4 seems to degrade quality as talked about above, although I don't know if going mkv to mp4 produces similar quality changes as straight out rendering into such a container. Other non supported containers like .ts produces favourable visual results as well.
So this is relating to the posed question of does ur video container just hold the codecs and not affect anything really whether it be "supported" by a streaming site or not? It's all irrelevant and its the codecs that determine everything?
The choice of container has no bearing on stream quality, which is determined solely by encoder parameters.

What may happen is that the stream could have non-standard or at least unexpected colorimetry properties and some containers can't store that metadata or may have stored them incorrectly. Also possible is that the metadata is correct but the player doesn't parse them correctly or at all depending on the container. This can lead to a difference in rendering, which you perceive as a change in quality.