RGB led strip disconnecting after updating

I have a custom board with an ESP8266, three transistors and a short led strip (about 0.5m). It was working fine but I decided to update the esphome version and now I’m experiencing disconnects.
The previous working version was 2022.12.2 and now I have updated to 2023.12.9.

While it’s idle it’s fine. When the rgb is on at any color, it randomly disconnects after 2-3 hours. The led strip is too short and I have tested more powerful power supplies, so I don’t think it’s a power issue. Also the wifi signal was and still is about -60dBm.
What else should I check? Why did it started to disconnect after the update?

Here is the config

substitutions:
  devicename: rgb-bedroom
  friendlyname: RGB Bedroom

esphome:
  name: $devicename

esp8266:
  board: esp01_1m

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_wpa
  fast_connect: on
  ap:
    ssid: $friendlyname Hotspot
    password: !secret hotspot_pass

captive_portal:

logger:

api:
  encryption:
    key: !secret api_key
  
ota:

switch:
- platform: restart
  name: $friendlyname restart

light:
  - platform: rgb
    name: $friendlyname LED
    red: red_channel
    green: green_channel
    blue: blue_channel

output:
  - platform: esp8266_pwm
    id: red_channel
    pin: GPIO5
  - platform: esp8266_pwm
    id: green_channel
    pin: GPIO14
  - platform: esp8266_pwm
    id: blue_channel
    pin: GPIO12

sensor:
  - platform: uptime
    name: $friendlyname Uptime
    update_interval: 30s
  - platform: wifi_signal
    name: $friendlyname WiFi Signal
    update_interval: 60s

binary_sensor:
  - platform: status
    name: "${friendlyname} Status"

I have enabled the debug component and the device is not disconnecting. If I remove the debug it starts disconnecting again a few minutes or hours after turning the rgb light on.
How could the enabled debug preventing it from disconnecting?

It might not help since this should be the default for ESP8266 devices, but can you add

  power_save_mode: none

under your wifi section?

If that still doesn’t work, you might have to restore an earlier version of esphome, either by reloading a backup or by using this project.