Not every flash of light means the same thing.
If you see a truck flashing behind you, pay close attention to the moment it happens. Does the flash occur exactly after you have overtaken the truck? Then there is a good chance the driver is trying to help you. If the signal occurs at a different time, something else might be going on. Perhaps the driver wants to warn of danger. It could also mean that another traffic situation requires his attention.
That is why you can never rely blindly on a single light signal. View it primarily as additional information from another road user. Ultimately, you must always judge for yourself whether a maneuver is safe. So, the next time a truck briefly flashes its lights after overtaking, you don’t need to panic immediately. Chances are there isn’t an irritated driver behind you at all. He is probably just trying to tell you that you have completely passed him. A small gesture, but one that can make driving behind long vehicle combinations a lot easier.