When you say ‘Auto shut down’ do you mean back to the Lock Screen? If your phone is locked when you remove the charger it should remain locked. If you mean physically ‘power off’ then I don’t think that’s possible to do automatically.
Or have I misunderstood your question?