The problem here is with Yoast. Because it does not consider Capital words or any other alternatives. So if my keyword is "SEO", but i have written it elsewhere as "seo", yoast will not count the 2nd one as a keyword.
But here's my suggestion. As long as you know that keyword density is important, and if you have written the article, i m sure keyword density will be fine. Taking the above example, Google with its Smart knowledge generally takes "SEO" "seo" as one word and furthermore, it will increase your post score if you have used "search engine optimization" "search optimization" "optimizing search" or other such LSI keywords. So as long as you KNOW about keyword density, and contribute to it a bit, there is no need to actually count it to 2.5%
Even 1% will do provided you have good LSI keywords and article is connected very well to the keyword.