This sounds an issue with the brake light switch.
The brake light switch is located under the brake pedal. When you depress the brake pedal, the switch gets pushed and the brake lights turns on.
Here is a helpful video:
Hyundai also had a recall with regard to these brake light switches as well.
So, call the dealer and provide them with the VIN. They can tell you if that recall was performed.
Please let me know of any questions.
Images (Click to enlarge)
Thursday, October 7th, 2021 AT 9:11 AM