If that had happened, Ingenuity would have been trapped and unable to operate. It was built and launched as a "technology demonstrator," at very low cost by NASA spaceflight standards, only about $80M. Most of its electronics are commercial off-the-shelf parts, from the cell-phone industry.
Its mission was to demonstrate that autonomous flight on Mars was possible, and it is dependent on the rover for communications. It was not part of other mission objectives - since it might well have crashed on its first flight - and the rover being immobilised would have been a far more serious problem for the mission than the loss of the helicopter.
As things turned out, Ingenuity has been a surprisingly comprehensive success, and is now part of mission operations. It will probably crash someday, though.