Since 4 years ago I have noticed this same problem on few of my sites, I was never able to find the reason behind this, no penalty, no bad links, first time I changed domains and started new sites, but after checking dozens of other websites in my niche and even in other niches losing of organic keywords that you see on ahrefs is something that happens randomly every few months depending on website but even to totally whitehat and very big authority sites (its just you may lose hundreds of kws but big sites lose thousands). For example since 2 months ago I notice losing of hundreds of keywords on my site, but traffic is still same. Upon checking it seems that I lose the keywords that are not even relevant to my website and keywords that are on positions let say 25-80, maybe Google figured out they shoudn't be ranked for my articles anyway so it just drop them. For example let say you have article ''best phillips smart tvs'' and your article will maybe show for keyword ''smart tvs'' on position 80-90, ahrefs will detect and show it, but later it can also show when this keyword is gone, and you may think oh im losing keywords but as long as your top 10 and top 3 keywords are still there you are good. So keep working and ignore this because keywords will start coming back you will see new ones after some time, unless you did something to your site thats really bad and you know it could be reason for a penalty, in this case try to fix that first such as removing bad links or content.