ESP32s Bluetooth Proxy not working (?)

I was having the same problem with an ESP32 DEVKITV1. After many hours of frustration I realised that the version of ESPHome I had installed was not the latest version. After updating to the latest version everything worked fine. Check the version in settings/add ons/ESPHome. The version that I now have is 2022.9.4