This is a MYTH!
It’s a tradition but not halacha, so you don’t have to feel like you’re not completing the mitzvos of Purim. That being said, if you want to have hamentashen, do so! It’s not like most holidays where you have them throughout the year. Enjoy one this Purim holiday and know that you’ve kept to tradition along with your healthy habits.
1 hamentashen counts as a treat