It certainly works for me (on Big Sur): I renamed the database test.dtSparse to test.sparseimage, opened Disk Utility, selected Images/Resize, selected test.sparseimage, entered the password, entered the new size. Then renamed the file back to test.dtSparse.