Box2D debugDraw not following stage position

I’m using Cocos2d-x version 3.08. I’ve got the debug draw working (using GLES-Render.h), but the drawn shapes are not positioned correctly. I am moving parent the node of my game objects to keep them on screen. When I did the very same thing in the Obj-C version of Cocos2d, the debug draw seemed to automatically take into consideration the parent node of the game objects. I don’t know how to apply the node’s translation to the debugDraw. Can anyone help with this?

void Gameplay::draw(cocos2d::Renderer *renderer, const cocos2d::Mat4& transform, uint32_t flags)
{
    cocos2d::Layer::draw(renderer, transform, flags);
    
    if (_session->getDebugDraw() != nullptr) {
        GL::enableVertexAttribs(GL::VERTEX_ATTRIB_FLAG_POSITION);
        Director::getInstance()->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
        _world->DrawDebugData();
        Director::getInstance()->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
    }
}