Do you know where those X-B3 headers come from? The Elastic APM Agent does not set those.
Looks like maybe some other tracing library is interfering and creating a span inbetween Service A and Service B.
As a result, the parent of the Service B span is not known to elastic, causing it to not be rendered in the waterfall. Maybe your API gateway has some built-in tracing causing this behaviour?