Why can't I stick to a diet?

Accountability. I agree with dr. Ferdowski that diets are difficult, but lasting lifestyle changes will be more helpful to you. Most also need accountability with others, for what you're doing for yourself. For this you could work with a health coach. There are also groups such as weight watchers, overeaters anonymous, and tops (taking off pounds sensibly) with regular meetings. Helps keep you on track.
Temporary fix. Although diets are used for weight loss they are a temporary fix. One needs to change ones perspective. Practicing 'mindfulness' can be very helpful in addition to exercise and plant based diets. Wishing you the very best.