This is not related to topic tracking state because topic tracking state deals with the count of unread/new topics but not the number of unread counts within a topic. I did some digging and this is caused by
https://github.com/discourse/discourse/pull/15772
Basically, unread post counts for a topic should only be set when the user’s notification level of a given topic is tracking or higher which the current code added by the PR did not consider.
I have an initial fix but I need to write tests for it before I push a PR up.
