Yes. This worked for me using a Xiao ESP32S3 Sense with OV3660 camera fitted. The registers on the OV5640 appear to be the same so I expect it will work on that too. I understand that OV5640 runs so hot that it needs a heatsink. Putting it into software standby using this trick when not required might make it useable for still photos. I’d be interested to know if it works. I have avoided the OV5640 so far because of the overheating issue.