Yep, this is a feature of NDC that pops up. An obvious and discussed approach is to use valid_end_date, valid_start_date to separate those 2 codes. To implement this logic, we need a reliable source of codes, names, and their valid dates. This is why there is an ongoing collection of NDC codes from different sources so that these codes can be validated and inserted into the vocabulary.
The corresponding forum thread is here: Missing NDCs remote studies
so everybody is more than welcome to submit their data there.