Why is my /playsound command not playing even though I am in range of the target selector?

You are not using the target selector incorrectly. It's because the sound from /playsound is being played cannot be heard from locations outside the 14-block dome you have found.

Using a target selector allows the selected players to hear the sound only if they're within range. The range is 16 blocks, but because your command blocks are slightly farther out, the range is actually 14 blocks inside your area.

To get the sound to play even if your players are not within 16 blocks of the command block, you'll need to use the minVolume argument. From the Minecraft Wiki:

Specifies the volume for targets outside the sound's normal audible sphere. If a target is outside the normal sphere, the sound is instead centered some short distance from the target (less than four blocks away), and minimumVolume determines its volume. Must be from 0 to 1.

Fixed command:

playsound minecraft:ambient.custom.worldspawn music @a[dx=23,dy=10,dz=19,scores={musicRemaining=0}] ~ ~ ~ 1.0 1.0 1.0