Hello, I would have a look at the brake light switch at the brake pedal to see if it is functioning properly. Is it sticking allowing the lights to stay illuminated?
Note also that the brake lights will work, when the pedal is depressed, no matter what the running condition of the vehicle is -- that is normal.
RepairPal Certified shops can diagnose and repair your 2007 Jeep Compass. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.