Temperature of AHT20 sensor keeps rising on Wemos S2 mini

Good enough.

Remove the component from your code.

I would suggest normally to have that kind of wiring, but your case is so weird, you could try with longer one. I remember some case with another brand ht sensor suffering from close contact to Esp (not thermally).

Anyway, like you can see there’s not a lot to offer at this point…
Esphome could have bug with sensor internal heater control, but just for Esp32, not so probable.
And I expect you have tried other pins already.