When a connection to an https site starts, the program lists the encryption methods it supports, in a certain order. Each browser and each library has its own recognisable list. A site can read it before any page is requested.
A script that claims to be Chrome in its user agent but opens connections like a Python library contradicts itself. A proxy passes the encrypted connection through unchanged, so it cannot fix this. A real browser, or a client built to copy one, can.
Read next: Web scraping without getting blocked