the sound suddenly disappeared. I did a reboot, did the factory settings, but nothing helped. The sound through the TV or receiver does not go. Sound comes through Apple headphones
Verify the connection wires, that all the plugs are properly seated.
Set Apple TV to use ‘TV Speakers’. That will output over HDMI for the best quality.
If connected as
Apple TV → TV → soundbar
then verify that the TV is set for audio passthrough.
If Apple TV Audio Format: Auto (PCM Multichannel) isn’t supported, then try the alternative formats: Dolby Digital 5.1 or Stereo 2.0.
top bar doesn't disappear
That is a function of your TV, not a function of the Apple TV box. Use the TV remote and/or see the TV manual.