Sorry for that the Time Type in power BI isn't existed millisecond and related functions. How did your data stored? If your records store with a common time format, it will remove milliseconds when you getting data and convert them to Power BI data model tables.
Can you share some screenshots around the issue please? This is not helping much.
I have not seen any way in the past on how to get the milliseconds to work.
What I would suggest doing is to possibly put the milliseconds into another seperate column, which will allow you to calculate the milliseconds correctly and then you can update it in your existing measure?
A question I would have is are the milliseconds even required?
Did I answer your question? Mark my post as a solution!