The WiFi seems to use the ADC2. Answers on other websites state, that that doesn´t matter, if your not using the pins that the ADC2 uses as an ADC channel. That turns out to be wrong.
Pin 2 and 4, which in this case were used as TFT_DC
and TFT_RST
are channels of ADC2. Changing the pins to 32 and 33 does the job:
#define TFT_CS 5
#define TFT_RST 32
#define TFT_DC 33
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);