TCP mode, by definition, means that the proxy doesn't look at what is inside the connection; it proxies one connection to one destination. What you're asking for isn't TCP mode at all, but HTTP mode for http2. Which is a work in progress, but not yet available in HAProxy.
Andrew