The path of addressing an entity and all its descendants should follow OData v4 URL conventions:
serviceRouter should be updated to use path expressions following OData URL conventions e.g.
serviceRouter.get('/:entitySet\\(:id\\)', bindEntitySet(), getEntity());
instead of the REST-like path: serviceRouter.get('/:entitySet/:id', bindEntitySet(), getEntity());
or
serviceRouter.get('/:entitySet\\(:id\\)/:entityFunction', bindEntitySet(), getEntityFunction());