I found the answer and I just want to add it for the record.
The problem here is that I moved the records from the CDC tables to my own tables to prevent them from being deleted.
fn_cdc_map_lsn_to_time uses a system table to map the LSN from the cdc tables to time stamp. after some time those records will be deleted that is why some of the records where mapped correctly to time because they were recently added,
but the old ones were not mapped because they were already deleted.