Iphone X scale factor issue in v3.17

Hi
I used cocos v 3.17Framework to fix the safe area issue of the iPhone X. But the scale factor for the objects are not proper, The sprites created overlaps one another, whereas in other devices it’s proper.

For now, I used the scale on sprites (in case of iPhone X) which is not the proper method.
So is there any method to fix the scale issue? Plese help me to resolve this issue

Can you show us?

You Mean the screen Shot?

The following code is used to determine the design resolution and scale factor of the device.
Do I need to change anything for iPhone X?

// Set the design resolution
designResolutionSize = cocos2d::Size(1212, 768);
Resource mediumResource =  { cocos2d::Size(1212, 768),  "Normal" };
 Resource largeResource  =  { cocos2d::Size(2424,1536), "HD" };

    Size frameSize = glview->getFrameSize();


glview->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height, ResolutionPolicy::NO_BORDER);


vector<std::string> searchPath;

float genericDeviceWidth = (frameSize.width > frameSize.height) ? frameSize.width : frameSize.height;
float genericDeviceHeight = (frameSize.width > frameSize.height) ? frameSize.height : frameSize.width;

if (genericDeviceWidth > designResolutionSize.width || genericDeviceHeight > designResolutionSize.height)
{
    scaleFactor = largeResource.size.height/designResolutionSize.height;
    searchPath.push_back(largeResource.directory);
    
    director->setContentScaleFactor(scaleFactor );
    
}
else
{
    
    workingArea = Size(1024.0f, ceilf((1024.0f / 960.0f) * 640.0f));
    
    
    float scaleFactor_deviceToResources = genericDeviceWidth / mediumResource.size.width;
    
    if(scaleFactor_deviceToResources * mediumResource.size.height < genericDeviceHeight)
    {
        scaleFactor_deviceToResources = genericDeviceHeight / mediumResource.size.height;
    }
    
    float scaleFactor_workingAreaToDevice = (scaleFactor_deviceToResources * workingArea.height) / genericDeviceHeight;
    
    if((scaleFactor_workingAreaToDevice * genericDeviceWidth) < (scaleFactor_deviceToResources * workingArea.width))
    {
        scaleFactor_workingAreaToDevice = (scaleFactor_deviceToResources * workingArea.width) / genericDeviceWidth;
    }
    
    scaleFactor = scaleFactor_workingAreaToDevice;
    searchPath.push_back(mediumResource.directory);
    director->setContentScaleFactor(scaleFactor);
    
}