There are several threads about this issue in the forum. Just search for “finder slash”, e.g.
Getfolderitem Volume(i).name error (“:” replaced by “/”)
folderItem.name with slashes change
Xojo 2020r1: Can’t get correct file name if it contains slashes
So this is a macOS “feature” and no bug.