Do you have a screenshot of the flow? It's a bit easier to see that way.
Honestly if TX power fixed it then it's more of a physical problem than a software one. It's literally just that the signal isn't getting through very reliably to the Pi that is trying to receive it.
If you're using WiFi on the Pi then you could try using Ethernet instead - that can help since the same aerial is used for both WiFi and Bluetooth, so WiFi traffic can make it harder to read from bluetooth.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Do you have a screenshot of the flow? It's a bit easier to see that way.
Honestly if TX power fixed it then it's more of a physical problem than a software one. It's literally just that the signal isn't getting through very reliably to the Pi that is trying to receive it.
If you're using WiFi on the Pi then you could try using Ethernet instead - that can help since the same aerial is used for both WiFi and Bluetooth, so WiFi traffic can make it harder to read from bluetooth.