R2 deleted objects become empty files

I have used the S3 SDK to delete R2 objects, those deleted objects still kept in the objects list in the form of zero-size files. But when I try to use dashboard to delete the objects, they are as expected to be deleted completely. Are there something wrong with my s3 operation?