Whenever a string date is given, MongoDB\BSON\UTCDateTime instances need an intermediate DateTimeInterface instance to be created:
new UTCDateTime(new DateTimeImmutable('2021-05-18T00:00:00.000Z'))
It would be simpler if this could be done directly:
new UTCDateTime('2021-05-18T00:00:00.000Z')
Note that any string currently given to the constructor is parsed as a 64-bit number, so this may prove unfeasible. Ideally, the constructor would accept all formats accepted by DateTimeInterface implementations.