Prevent esp32 firmware against flash reading

I am using esp32 for a project and I want to prevent my firmware against flash reading. is there a way or an example for this? I tried flash encryption solution given by espressif several times and it didn’t work for me.

That’s the only thing that makes sense. Please specify exactly what you tried and what errors it gave you.