Redirect HTTPS traffic to original server

When using transparent mode and spoofing the server’s IP address (a la DNS spoofing), is it possible to redirect IP addresses of certain domains (by host or SNI) to the original server?

I managed to change the destination IP to the correct one using a lookup in the next_layer hook but for HTTPS sessions mitmproxy still seems to try and intercept with it’s own certificate the session.
Is there a way to indicate to mitmproxy to simply change the dest. IP and stop intercepting the session?