If the goal is to reduce the number of "thanks" comments, this doesn't seem like the best solution. I want to outline two alternatives, which would both avoid a negative impact on everyone who is using comments properly. I wonder if you have already considered them?
Alternative #1: a separate UI element
You could add a separate UI element, next to the "Add a comment" element, labelled "Thanks!".
That way, users who want to thank the poster can click "Thanks!", and there would be no need to insert a pop-up menu for everyone else who uses "Add a comment". This would avoid having any negative impact on people who using comments correctly.
Alternative #2: auto-detecting and blocking "thanks" comments
An alternative design is to keep the old UI for posting comments, without changes. When people post comments, auto-detect "thanks" comments and decline to post them. If you detect a "thanks" comment, block it and instead show a message to the user recommending they upvote instead, or pointing them to the "Thanks!" UI element for offering thanks. That would avoid negatively impacting people who are using comments properly.
Auto-detecting "thanks" comments sounds like an ideal application for a ML classifier (don't shoot me, please hear me out). I expect it should be straightforward to fine-tune a small language model (Llama 7B? Flan-T5? RoBERTa?) on a training set of "thanks" comments and non-"thanks" comments and obtain a classifier that can detect "thanks" comments. It would need empirical testing, but I'm guessing that setting a threshold on the softmax output from the language model should allow to control the false positive rate to a very low value. Even if you only detect 50% of "thanks" comments, the opportunity to teach users that such comments are inappropriate here might be sufficient to change user behavior.
Have you considered this alternative?
Last words
Ultimately, I'm not sure that "thanks" comments are the greatest priority or the largest problem that needs fixing. My impression is that there are bigger problems, e.g.,
Posters who are putting clarifications in the comments instead of editing their question/answer;
Old requests for clarification that are no longer needed because they have been addressed by editing the question;
Responses to old comments that have been deleted or can be deleted;
Comments that ask new questions.
Have you considered focusing effort first on the biggest problems, or at least the subset of biggest problems that can plausibly be addressed? I'm concerned that dealing with "Thanks" comments is a relatively small part of the issues with comments, and if it has a detrimental effect on users who are following the rules, the benefits might not be worth the cost.