Hi TZBit, and welcome to AF
If you are rooted then some anti-theft apps can be inserted into the system ROM, which means they would survive a factory reset (but not a reflash of the system software, of course).
Without unlocking the bootloader there is nothing I can think of that you can do. No Android app or setting can change this because you don't run android when you access recovery (because it's there precisely for when you can't run android!). Corrupting recovery so that it won't work is possible in principle (you don't care about your warranty, right?), but the risk of messing the device up in the process will be a lot higher than the risk of theft.
The truth is, it always comes down to how much the thief knows. A hard-reset resistent anti-theft (which as I say, will require root) would be enough to beat a chancer who just knows how to access recovery. But with someone who knows what they are doing, there is nothing you can do that can't be undone and will still leave you with a working phone.
People always talk about anti-theft apps in terms of recovering the phone, but in reality their ability to remote wipe the phone, i.e. keep your data from the thief, is more important to many people, and of course if the thief does a factory reset they've done that for you. And they can be useful for finding a phone that is lost rather than stolen. But there are limits to what you can expect: even without a factory reset, if the thief turns the phone off and then sells it for use overseas no anti-theft software will make much difference.