Hmm, just a thought. Since I notice you cleaned the air filter, I must ask, a stock filter or not?
cuz I have seen a few of these "P" flow filters cause these problems. Put back stock intake and oem filter, mass air flow goes back to normal. There is a tune you can get to fool the ecm, but say goodbye to good gas mileage.
Anyways, that was just a thought. Another good way to fry a sensor with a "P" flow shyte is those Kn style wet filters, gunk up the sensor, and as I used to do, would clean the sensor with brake parts cleaner and then use shop air to dry it. Well, little did know back then, I just fried that sensor and caused repeat comeback just for this same example code.
If all connections and air intake back to stock assuming it is not doesn't fix it, you probably need a new MAF and plz dont buy the cheap ones, in this area of sensor, you want high end or OEM at least. My experience is 28 now going on 29 yrs in this field, and I say this alot, this is where you dont want to cheap out on. Point in case, had a camry in the other day. client didnt want to pay for oem maf.
Code kept coming back. Had another camry in lot, with a evap problem, was waiting a few days to get a canister for it. So i took the MAF off that car and put it in the clients car and sent him on his way. Funny thing is, client never came back. So now I had to explain to my boss why we had to buy a new toy MAF. Boss wasnt happy. I said I dont care. That is one client we dont need if he wont listen to head tech.