While legally there is no question that an EU citizen will be able to enter the EU with a national identity document (or any official proof of citizenship), the airlines are usually allowed to have a more restrictive checking to avoid getting fined just in case you are turned back.
Often this is checked by Timatic or equivalent automated database queries that may fail or be too conservative for relatively infrequent documentations.
You can check https://klm.traveldoc.aero/ or https://www.iatatravelcentre.com/ to see what the airlines will see when the staff enters the combination of your itinerary and available documents.
For example, for KLM's traveldoc service, a valid EU national ID card alone is suffice to fly from Canada to any EU country. But for flights originating from the U.S., a passport is required to depart from the USA, which then requires a three-month validity. However, the validity requirement is waived if you hold a residence permit in the destination country.
Timatic (IATA) would allow the travel if you put only national ID card as the primary travel document, but not if you put your nationality and travel document as American.
You may have a better luck, though not guaranteed, if
- you use an European airline with European ground staff who may be more familiar with EU ID cards
- you ask or even insist politely but firmly that the airlines put the EU ID card as the primary travel document, perhaps even without mentioning the U.S. passport
- you fly directly to Hungary and you present the ID card and ask the staff to put it in as a residence permit issued by Hungary
- you connect in a country without passport validity requirement for US citizens, e.g. UK or Ireland or Canada, where the national ID card suffices for the airlines for EU-bound flights.