### What problem does this PR solve? Fixed the issue of "stop deleting when encountering invalid dataset ID" #5760 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>