To the OP, yes Gregory can still be fired after the end of the season and the buyout is still 20-weeks of his annual salary or roughly $450k - reportedly there was no change to the buyout in his contract with the extension.
The bigger issue is for Kelly - firing a guy just a couple months after extending him in such a public way will further damage his credibility. With the downward trajectory he has the athletic department on, any additional missteps will cripple his ability to fundraise and rally support for the program. Gregory likely gets put on notice publicly after the season and gets a prove-it season in 2022-23.
For Kelly, has lost the Tampa Bay area and suspect that the support that remains within the 5 miles radius around campus will not last forever. The athletic department is a show of its former self.