You can also do it via dietpi-drive_manager
or:
systemctl enable dietpi-fs_partition_resize
reboot
Doing this on reboot is a bit safer, and that service/script assures that the kernel is informed about the partition table change before expanding the filesystem .