It’s supposed to work that way, but it’s actually bugged currently. 343 support acknowledged it in a tweet. From my personal experience, I can say the “Complete matches” and “Get headshot kills” challenges didn’t update for me even after 24 hours, but update immediately if you spectate out the rest of the match.
Your progress should update once the match ends. You won’t see progress immediately after quitting. Check back after your next match to see if your challenges progressed.
If you are talking about the daily challenge, it will “disappear” but you won’t be awarded the XP until the match officially ends.