The onboard bcm2835_audio audio driver indeed supports 16 bits only. When you use the ALSA auto-conversion plugin, audio streams are downsampled automatically. This can be e.g. enabled via dietpi-config audio options, or use the plug PCM plugin in case you use a custom asound.conf/.asoundrc.
But I guess you would actually like to play e.g. 24 bit audio sources natively? Check out this issue: 24 bit audio output on Raspberry Pi 4 b model · Issue #4204 · raspberrypi/linux · GitHub
So while bcm2835_audio does not support it, the dedicated HDMI audio driver that comes with vc4-kms-v3d actually does.
dietpi-config explicitly enables and uses the bcm2835_audio for consistency, and as it does not depend on the KMS video stack, but you may want to test using the KMS-embedded one:
# Assure that the full KMS video stack is enabled, including its HDMI audio driver (there is a "noaudio" flag)
G_CONFIG_INJECT 'dtoverlay=vc4-f?kms-v3d' 'dtoverlay=vc4-kms-v3d' /boot/config.txt
# Disable bcm2835_audio
G_CONFIG_INJECT 'dtparam=audio=' 'dtparam=audio=off' /boot/config.txt
# Reboot for changes to take effect
reboot
As /etc/asound.conf should use the audio card 0, and with disabled bcm2835_audio the KMS HDMI audio card should become card 0, it should be used right away. But verify via aplay -l.