I noticed the issue and tried to fix it. However, the key-value component doesn't provide a default auto-width option for the button. A possible solution is to inspect the button's class in the browser and apply custom CSS to adjust its width. This may be a bug.
This issue will be forgotten after a Retool version upgrade when the CSS class changes automatically. Unfortunately, there is no solution for now, as this appears to be a bug.
It does look like the generated buttons all have a maximum width, which causes particularly long string values to get cut off. I'll document this issue internally and provide an update here as soon as I can.
You do have the ability to adjust the button width via custom CSS, as mentioned above, but your other option for a short-term fix is to introduce white space into each value. The platform will detect the space, wrap the text value, and automatically adjust the height of button.