Update for clarity: Everybody agrees that the four-letter ICAO code is
B78X. I'm interested in the three-letter IATA code.
I looked it up in the corresponding IATA document and I can confirm it is 781.
Sadly I think I am not allowed to attach any kind of proof from the document but the source of my information is IATA document 8803 - Aicraft Types in version no. 28.
United flies the 787-10 between Newark (EWR) and Frankfurt (FRA) on the 787-10. Knowing this, I did a search on ITA with an extension code to filter for specific aircraft types in the results. With either
AIRCRAFT t:787 or
t:781, the expected flight was returned. Using
t:78J with the rest of the search unchanged yielded no results, so it appears that
781 is at least valid, and possibly the definitive answer since it seems unlikely that multiple codes would be in use.