The previous answer explains the why. My setting is managed by corporate so I can't change it. I just started using github copilot, but I have found using the inline copilot feature alleviates the public code issue encountered in the chat. Highlight section of code and right click to engage copilot.