When we set a phone to "lost mode" it's permanently locked until the maker unlocks it for us.

Back to HTC to fix this one.

I can't guess why you set it to lost or stolen mode if you just wanted to use or reset. That's a tactical error and for VERY GOOD REASONS should remain locked until the maker fixes it.