To prevent the rice from turning soft and mushy, rinse the rice before cooking, use oil during cooking, and avoid overcooking. Once cooked, let the biryani steam with the lid on for a few minutes off the heat.