Why does my brake lights go out when I turn on my head lights on 2006 Kia Rio

They work fine any other time

Asked by for the 2006 Kia Rio
Ground problem in brake lights. Does the high mount brake light work?