wav files typically contain uncompressed audio, and that is the default when producing a
wav file using
ffmpeg. So your command will already preserve the maximum quality, since there is no lossy compression (or compression of any kind) to reduce the quality.
Assuming that the original audio is compressed, you can keep the same quality without the large file size needed for uncompressed audio by just copying the original audio (without the video) to a new
ffmpeg -i my_video.mp4 -vn -acodec copy output_audio.mp4
You could also re-encode it or convert it to a different audio codec, but if that codec uses lossy compression then quality will be lost.