How long can you be out of Hungary if you have 5-year residence card?

How long can you be out of Hungary if you have 5-year residence card without losing your residence?
Some people say max 6 month a year and some people say there is no limit.
Also, Is there a limit for the permanent residence card?

This forum thread may provide answers: https://www.expat.com/forum/viewtopic.php?id=512854