1. Plaintiff's experts will have weeks or months to examine the code. There is a good chance they will notice it doesn't match what plaintiff figured out when they were doing their pre-lawsuit investigation to determine if there was enough evidence to support suing.
2. Plaintiff doesn't just ask for a copy of the code. They will ask for things like engineering notebooks kept during development, earlier versions, and various other things related to the development of the alleged infringing product. Facebook would probably have to fake quite a bit more than just the current product code.
They might claim they don't have any of that other stuff, but if they make/keep that kind of thing for their other products that is going to look pretty suspicious.
3. Plaintiff is going to depose individual engineers who were involved with the product, and probably also call some of them to testify in court. If they lie under oath (and depositions are under oath just like in court testimony) they could personally be charged with criminal perjury.
This is not one of those things where the employer is the one that gets punished. That falls squarely on the engineer.
That's not quite correct. You won't get to look at Meta's source code, but you will be able to have people you designate look at it for you.
Here's what happens.
1. From what you can readily see of their product and from what they've said publicly about it (documentation, press releases, presentations at trade shows, etc) you suspect that they are using your patented thing.
2. You do some reverse engineering and/or experiments to get more evidence to support or refute that.
3. If you get enough evidence to convince a patent litigation firm that they could file an infringement lawsuit for you without running afoul of Rule 11(b)(3) of the Federal Rules of Civil Procedure [1] have your patent litigation firm file such a lawsuit.
4. Your attorneys ask Meta's attorneys to provide a copy of Meta's source code. Meta does so. Typically they do so by turning it over to their attorneys and their attorneys set up a place in their offices where it can be viewed.
5. Your attorneys can go to that place and view the code. You can also hire outside experts to go look at the code and write reports to be presented as evidence at the trial.
6. Your attorneys can ask Meta to provide someone knowledgeable about the code to be deposed, where they can ask your attorneys and/or outside experts have about it.
This will work both ways. Meta's attorneys and outside experts will get to see your source code too if it is relevant to their defense or counterclaims. For example they might ask for your source to your image filter using products that were released before you filed for your patent, in order to try to show that they also used your patented methods and you failed to file the patent early enough.
BTW, patent trials are usually open to the public. It can be quite interesting because a lot of internal details from both plaintiff's and defendant's products can come out. I once spectated at a patent suit where Microsoft was a defendant, concerning some technology they used in Windows.
Plaintiff was using information from Mark Russinovich's books and articles about Windows internals. Russinovich's books were basically the Bible for third parties that needed to know Windows internals. Microsoft had engineers who actually worked on those parts of Windows testify and they specifically described several errors in Russinovich's books.
This was long after I'd worked on anything that needed to use undocumented Windows internals, but back in the day I'd worked for a company that made Windows system utilities and was spending half my time dealing with undocumented Windows internals the kind of information at that trial would have been a goldmine.
[1] https://www.law.cornell.edu/rules/frcp/rule_11