Here is the calling stacks, with almost all codes inside Qt:
------------------------ calling stacks -----------------
#0 0x00000001afbbae90 in CFRetain.cold.1 ()
#1 0x00000001af9db0b8 in CFRetain ()
#2 0x0000000147ceb99c in QCALayerBackingStore::GraphicsBuffer::asImage() at /Users/zhaoji/qt5/qtbase/src/plugins/platforms/cocoa/qcocoabackingstore.mm:581
#3 0x0000000147ceda18 in QCALayerBackingStore::flushSubWindow(QWindow*) at /Users/zhaoji/qt5/qtbase/src/plugins/platforms/cocoa/qcocoabackingstore.mm:403
#4 0x0000000100d03564 in QBackingStore::flush(QRegion const&, QWindow*, QPoint const&) at /Users/zhaoji/qt5/qtbase/src/gui/painting/qbackingstore.cpp:230
#5 0x0000000102cdd9b8 in QWidgetRepaintManager::flush(QWidget*, QRegion const&, QPlatformTextureList*) at /Users/zhaoji/qt5/qtbase/src/widgets/kernel/qwidgetrepaintmanager.cpp:1144
#6 0x0000000102cdfa30 in QWidgetRepaintManager::flush() at /Users/zhaoji/qt5/qtbase/src/widgets/kernel/qwidgetrepaintmanager.cpp:1064
#7 0x0000000102cdeb38 in QWidgetRepaintManager::paintAndFlush() at /Users/zhaoji/qt5/qtbase/src/widgets/kernel/qwidgetrepaintmanager.cpp:974
#8 0x0000000102cdedb8 in QWidgetRepaintManager::sync() at /Users/zhaoji/qt5/qtbase/src/widgets/kernel/qwidgetrepaintmanager.cpp:717
#9 0x0000000102ccf354 in QWidget::event(QEvent*) at /Users/zhaoji/qt5/qtbase/src/widgets/kernel/qwidget.cpp:9016
#10 0x0000000102de3d3c in QMainWindow::event(QEvent*) at /Users/zhaoji/qt5/qtbase/src/widgets/widgets/qmainwindow.cpp:1340
#11 0x0000000102c84a88 in QApplicationPrivate::notify_helper(QObject*, QEvent*) at /Users/zhaoji/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3409
#12 0x0000000102c85cbc in QApplication::notify(QObject*, QEvent*) ()
#13 0x00000001095d2ab8 in QTApplication::notify(QObject*, QEvent*) at /Users/zhaoji/client-delivery/Core/Neutron/UI/Base/Adaptations/QT/Application/QTApplication.cpp:819
#14 0x00000001019449f4 in QCoreApplication::notifyInternal2(QObject*, QEvent*) at /Users/zhaoji/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1067
#15 0x0000000102cdba68 in QWidgetRepaintManager::sendUpdateRequest(QWidget*, QWidgetRepaintManager::UpdateTime) at /Users/zhaoji/qt5/qtbase/src/widgets/kernel/qwidgetrepaintmanager.cpp:404
#16 0x0000000102cdb7a4 in void QWidgetRepaintManager::markDirty<QRect>(QRect const&, QWidget*, QWidgetRepaintManager::UpdateTime, QWidgetRepaintManager::BufferState) ()
#17 0x0000000102ce4f24 in QWidgetWindow::repaintWindow() at /Users/zhaoji/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp:778
#18 0x000000010198cf48 in void doActivate<false>(QObject*, int, void**) at /Users/zhaoji/qt5/qtbase/src/corelib/kernel/qobject.cpp:3924
#19 0x0000000100ce9200 in QWindow::screenChanged(QScreen*) [inlined] at /Volumes/DATA/Qt6/Qt6.2.46/qt5/qtbase/src/gui/Gui_autogen/include_RelWithDebInfo/moc_qwindow.cpp:686
#20 0x0000000100ce91e4 in QWindowPrivate::emitScreenChangedRecursion(QScreen*) at /Users/zhaoji/qt5/qtbase/src/gui/kernel/qwindow.cpp:498
#21 0x0000000100ce191c in QScreen::~QScreen() at /Users/zhaoji/qt5/qtbase/src/gui/kernel/qscreen.cpp:163
#22 0x0000000100ce1984 in QScreen::~QScreen() [inlined] at /Users/zhaoji/qt5/qtbase/src/gui/kernel/qscreen.cpp:133
#23 0x0000000100ce1980 in QScreen::~QScreen() at /Users/zhaoji/qt5/qtbase/src/gui/kernel/qscreen.cpp:133
#24 0x0000000100cf39b8 in QWindowSystemInterface::handleScreenRemoved(QPlatformScreen*) at /Users/zhaoji/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:811
#25 0x0000000147d0fd90 in QCocoaScreen::remove() at /Users/zhaoji/qt5/qtbase/src/plugins/platforms/cocoa/qcocoascreen.mm:208
#26 0x0000000147d0e898 in QCocoaScreen::updateScreens() at /Users/zhaoji/qt5/qtbase/src/plugins/platforms/cocoa/qcocoascreen.mm:161
#27 0x0000000147d242c4 in QCocoaWindow::windowDidChangeScreen() at /Users/zhaoji/qt5/qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm:1350
#28 0x0000000147d26f50 in QCocoaWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) at /Volumes/DATA/Qt6/Qt6.2.46/qt5/qtbase/src/plugins/platforms/cocoa/QCocoaIntegrationPlugin_autogen/include_RelWithDebInfo/moc_qcocoawindow.cpp:226
#29 0x0000000101953914 in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const at /Users/zhaoji/qt5/qtbase/src/corelib/kernel/qmetaobject.cpp:2390
#30 0x0000000147d2763c in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const [inlined] at /Users/zhaoji/qt5/qtbase/src/corelib/kernel/qmetaobject.h:126
#31 0x0000000147d27608 in invocation function for block in qRegisterNotificationCallbacks() at /Users/zhaoji/qt5/qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm:124
#32 0x00000001afa4d55c in __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ ()
#33 0x00000001afaeb054 in ___CFXRegistrationPost_block_invoke ()
#34 0x00000001afaeaf9c in _CFXRegistrationPost ()
#35 0x00000001afa1eb74 in _CFXNotificationPost ()
#36 0x00000001b090c72c in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
#37 0x00000001b2ea0bbc in __67-[NSWindow _updateSettingsSendingScreenChangeNotificationToScreen:]_block_invoke ()
#38 0x00000001b2d1b528 in NSPerformVisuallyAtomicChange ()
#39 0x00000001b2ea09c0 in -[NSWindow _updateSettingsSendingScreenChangeNotificationToScreen:] ()
#40 0x00000001b2fe1cd0 in -[NSWindow _screenChanged:] ()
#41 0x00000001b2fe1c28 in -[NSWindow _displayChangedSoAdjustWindows:] ()
#42 0x00000001b364bc6c in -[_NSFullScreenContentController displayChanged] ()
#43 0x00000001b36f0148 in -[_NSFullScreenSpace displayChanged] ()
#44 0x00000001b36eee18 in _fullScreenInstanceMovedSpaces ()
#45 0x00000001b46804dc in (anonymous namespace)::notify_datagram_handler(unsigned int, CGSDatagramType, void*, unsigned long, void*) ()
#46 0x00000001b49ac4c4 in CGSDatagramReadStream::dispatchMainQueueDatagrams() ()
#47 0x00000001b49ac3c0 in invocation function for block in CGSDatagramReadStream::mainQueueWakeup() ()
#48 0x0000000103890ecc in _dispatch_call_block_and_release ()
#49 0x00000001038929d4 in _dispatch_client_callout ()
#50 0x00000001038a5e90 in _dispatch_main_queue_drain ()
#51 0x00000001038a59bc in _dispatch_main_queue_callback_4CF ()
#52 0x00000001afa99d50 in __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ ()
#53 0x00000001afa577d0 in __CFRunLoopRun ()
#54 0x00000001afa56888 in CFRunLoopRunSpecific ()
#55 0x00000001b912bfa0 in RunCurrentEventLoopInMode ()
#56 0x00000001b912bde4 in ReceiveNextEventCommon ()
#57 0x00000001b912bb2c in _BlockUntilNextEventMatchingListInModeWithFilter ()
#58 0x00000001b2cd8424 in _DPSNextEvent ()
#59 0x00000001b2cd75b4 in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] ()
#60 0x00000001b2ccb9e4 in -[NSApplication run] ()
#61 0x0000000147cf4ce0 in QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) at /Users/zhaoji/qt5/qtbase/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm:430
#62 0x000000010194dd5c in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) [inlined] at /Users/zhaoji/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:139
#63 0x000000010194dd38 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) at /Users/zhaoji/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:230
#64 0x00000001019450d0 in QCoreApplication::exec() at /Users/zhaoji/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1382
#65 0x00000001095cfd4c in QTApplication::exec() at /Users/zhaoji/client-delivery/Core/Neutron/UI/Base/Adaptations/QT/Application/QTApplication.cpp:285
------------------------ end calling stacks ---------------