The Competition and Markets Authority (CMA) said customers who could not take flights should be offered full refunds, but the investigation would take too long and be too expensive for the taxpayer to be justified.
In June, the CMA launched the investigation and said the companies may have needed to issue refunds for flights that took place but were not allowed for non-essential travel.
BA said it offered refunds for all flights that were cancelled.
Legally, customers are entitled to a cash refund within 14 days if flights are cancelled but this does not clearly cover when flights take place but customers are legally prohibited from travelling.
The CMA said that after initial analysis it had concluded that the law “does not provide passengers with a sufficiently clear right to a refund in these unusual circumstances to justify continuing with the case”.
The regulator called for the law to be clarified to help passengers secure refunds.
Andrea Coscelli, chief executive of the CMA, said: “We strongly believe people who are legally prevented from taking flights due to lockdown laws should be offered a full refund and we launched this investigation in the hope that we would be able to secure a positive outcome for consumers.
“However, after considering the relevant law and gathering evidence in our investigation, we have concluded that the length of time that would be required to take this case through the courts, and the uncertain outcome, can no longer justify the further expense of public money.
“Given the importance of this to many passengers who have unfairly lost out, we hope that the law in this area will be clarified.”
A spokeswoman for Ryanair said: “Ryanair welcomes the CMA’s decision to close its investigation.
“We operated a limited schedule during UK lockdowns for customers who travelled for essential reasons.
“Passengers had the option to change their bookings without paying the flight change fee and many availed of this option.”