the problem is probably in your raspi-config

this happens to me and I have to force audio out the HDMI or headphone depending on the monitor/output

the pi likes to forget what its doing so you have to force the output to config for a more stable experience