Hey laubruni.
Welcome to Apple Support Communities.
The article linked below provides general troubleshooting tips that’ll resolve most issues, even those like the one that you’ve described where audio playback stops when the display dims on your iPod nano.
iPod nano (7th generation): Hardware troubleshooting - Apple Support
The Five Rs: Reset, Retry, Restart, Reinstall, Restore
Remember these five basic suggestions if you have an issue with iPod nano. Try these steps one at a time until the issue is resolved. If one of the following doesn't help, read on for solutions to specific issues.
Take care,
-Jason