ESP32 ble scan_evt timeout

I developed a project by performing BLE beacon scanning with ESP32. The environment where the ESP is located is a deserted place with few people. I continuously perform BLE scanning in this environment, but the BLE transmission only occurs when a person enters the environment. Actually, the transmission is triggered when a button on a card emitting BLE beacon is pressed. In this case, the working ESP constantly gives a “scan_evt timeout” error. I have researched the solution for this issue, but I couldn’t find a clear solution on forums and blogs. My BLE settings are as follows:

pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks(), true, false); pBLEScan->setActiveScan(false);
pBLEScan->setWindow(1250). Does anyone have a solution suggestion?