How to trim a video with frame precision using ffmpeg?
You seem to have a fundamental misunderstanding of how video works.  Video is composed of frames.  You can't have millisecond precision because video doesn't have millisecond precision.  If there are 30 frames per second in the video, you can only stop after one of those frames.  That means your options are only every 1/30th of a second roughly.
If the format is group of pictures based it may be limited when it can end as well depending on the formats ability to end a group of pictures early. (A group of pictures is used in formats where some frames are stored as changes from other related frames rather than full images.)

What are you trying to accomplish that you need this precision for?  Perhaps there may be an alternate way to accomplish your goal.