The answer depends on the ban on passing at a railroad crossing: it applies on the crossing itself and within 100 m before it. The ban does not continue past the crossing. So you may start passing the truck ahead as soon as you have driven over the crossing, provided the oncoming lane is clear for a long enough distance and no other ban prevents passing