The issue might be with the Z, not with milliseconds.
Names Default To Here(1);
date_str = "2020-06-11T03:18:30.123Z";
Show(Informat(date_str, "Format Pattern", "<YYYY><-><MM><-><DD><'T'><hh24><:><mm><:><ss>"));
//drop Z
date_str = Left(date_str, Length(date_str) - 1);
Show(Informat(date_str, "Format Pattern", "<YYYY><-><MM><-><DD><'T'><hh24><:><mm><:><ss>"));
date_with_ms = Format(date_formatted, "yyyy-mm-ddThh:mm:ss", 25,3);
show(date_with_ms);
-Jarmo