All of my devices which have android 5, 6, etc. have a properly functioning anti-theft. However my new device which has android 8 does not work correctly with the anti-theft. The anti-theft thinks that it successfully locked my device. However the device does not show the avast lock screen and instead just goes back to the normal lock screen which is swipe to unlock. So the lock really does nothing on the device.
I think it might somehow be related to the screen lock settings on the device which all say "because you've turned on an accessibility service, your device won't use your screen lock to enhance data encryption".
But for whatever reason, anti-theft locking does not work on my android 8 device.