Cannot copy text snippet from chat

When I try to copy/paste just one or two lines of text out of Chat’s generated code snippets (like in the attached image) it clicks the entire code block chat is generating. Sometimes this happens and sometimes it does not. I really need help here with this. How do I make sure I can copy specific text from inside the generated code?