So there's a couple of misunderstandings here. First one is that Tesla did not "give away" their patents. They just promised that they would never litigate their patents against anyone unless it was in defense.Just a guess but doesn't patents have a value in the annual report? Intellectual property or something? Like some GM patent for their engines is booked at $XX millions. So to give them away would result in a paper loss for them.
I would be very surprised if they are not considered having some value. For some companies (medicine comes to mind) most of their value can come from patents.
Tesla gave away their patents so early that they had little value at the time.
All Our Patent Are Belong To You
Tesla will not initiate patent lawsuits against anyone who, in good faith, wants to use our technology.
Secondly, the patents are still valid, and still have a value that could appear on the balance sheet, but I think it would be up to the company and their auditors whether to recognize such an intangible. It would be in the same kind of category as business reputation or trade secrets. In the Q4'19 presentation they said that "Goodwill and intangible assets" was worth 537M$. Some of that would be their patents, I think.
Thirdly, while the patents still have value, they don't represent income. So they don't affect profit or loss or cashflow. Of course if Tesla licensed them out, there would be separate entries for licensing revenue, but they don't.