What happened?
Description
I'm in the process of upgrading Craft CMS and Craft Commerce from 4 to 5 and am getting to the migration portion of the upgrade and get "failed to apply m230617_070415_entrify_matrix_blocks"
The full error I get

Steps to reproduce
- following the Craft CMS/Commerce upgrade guides for 4 to 5.
- php82 craft project-config/rebuild
- php82 craft utils/fix-field-layout-uids
- changing over plugins to Craft 5 compatibility (added both before and after to installed plugins and versions)
- composer update
- php82 craft up (this is where the error happens)
The closest issue I found was "[5.x]: After Update Migration with foreign_key constraint of matrix blocks fails integrity constraint violation #14839"
and so I tried adding into the above steps
- craft gc
- use Fix FK plugin
- run DELETE FROM craft_matrixblocks WHERE id NOT IN (SELECT id FROM craft_elements)
- run the upgrade process and the issue persists.
Craft CMS version
5.1.6
PHP version
8.2.5
Operating system and version
Linux 3.10.0-1127.8.2.el7.x86_64
Database type and version
MySQL 8.0.29
Image driver and version
gd 8.2.5
Installed plugins and versions
"craftcms/cms": "4.9.5",
"craftcms/commerce": "^4.0.0",
"vlucas/phpdotenv": "^5.4.0",
"verbb/super-table": "3.0.14",
"craftcms/redactor": "3.0.4",
"ether/seo": "4.2.2",
"mmikkel/cp-field-inspect": "1.4.4",
"sebastianlenz/linkfield": "2.1.5",
"xpertbot/craft-wheelform": "3.2.1",
"verbb/image-resizer": "3.0.11",
"verbb/cloner": "2.0.4",
"doublesecretagency/craft-cpcss": "2.6.0",
"hybridinteractive/craft-position-fieldtype": "4.0.0",
"craftpulse/craft-colour-swatches": "4.4.0",
"utakka/redactor-anchors": "1.5.0",
"verbb/cp-nav": "4.0.12",
"craftcms/ckeditor": "3.8.3",
"verbb/hyper": "1.1.30",
"presseddigital/linkit": "4.0.4.1",
"craftcms/fix-fks": "2.1.0"
upgrading to
"craftcms/cms": "5.1.6",
"craftcms/commerce": "5.0.7",
"vlucas/phpdotenv": "^5.4.0",
"verbb/super-table": "4.0.0",
"ether/seo": "v5.0.0-rc2",
"mmikkel/cp-field-inspect": "2.0.1",
"xpertbot/craft-wheelform": "4.0.0",
"verbb/image-resizer": "4.0.0",
"doublesecretagency/craft-cpcss": "3.00",
"hybridinteractive/craft-position-fieldtype": "5.0.0",
"craftpulse/craft-colour-swatches": "5.0.0",
"verbb/cp-nav": "5.0.0",
"craftcms/ckeditor": "4.0.6",
"verbb/hyper": "2.0.0",
"presseddigital/linkit": "5.0.0",
"craftcms/fix-fks": "2.1.0"
What happened?
Description
I'm in the process of upgrading Craft CMS and Craft Commerce from 4 to 5 and am getting to the migration portion of the upgrade and get "failed to apply m230617_070415_entrify_matrix_blocks"

The full error I get
Steps to reproduce
The closest issue I found was "[5.x]: After Update Migration with foreign_key constraint of matrix blocks fails integrity constraint violation #14839"
and so I tried adding into the above steps
Craft CMS version
5.1.6
PHP version
8.2.5
Operating system and version
Linux 3.10.0-1127.8.2.el7.x86_64
Database type and version
MySQL 8.0.29
Image driver and version
gd 8.2.5
Installed plugins and versions
"craftcms/cms": "4.9.5",
"craftcms/commerce": "^4.0.0",
"vlucas/phpdotenv": "^5.4.0",
"verbb/super-table": "3.0.14",
"craftcms/redactor": "3.0.4",
"ether/seo": "4.2.2",
"mmikkel/cp-field-inspect": "1.4.4",
"sebastianlenz/linkfield": "2.1.5",
"xpertbot/craft-wheelform": "3.2.1",
"verbb/image-resizer": "3.0.11",
"verbb/cloner": "2.0.4",
"doublesecretagency/craft-cpcss": "2.6.0",
"hybridinteractive/craft-position-fieldtype": "4.0.0",
"craftpulse/craft-colour-swatches": "4.4.0",
"utakka/redactor-anchors": "1.5.0",
"verbb/cp-nav": "4.0.12",
"craftcms/ckeditor": "3.8.3",
"verbb/hyper": "1.1.30",
"presseddigital/linkit": "4.0.4.1",
"craftcms/fix-fks": "2.1.0"
upgrading to
"craftcms/cms": "5.1.6",
"craftcms/commerce": "5.0.7",
"vlucas/phpdotenv": "^5.4.0",
"verbb/super-table": "4.0.0",
"ether/seo": "v5.0.0-rc2",
"mmikkel/cp-field-inspect": "2.0.1",
"xpertbot/craft-wheelform": "4.0.0",
"verbb/image-resizer": "4.0.0",
"doublesecretagency/craft-cpcss": "3.00",
"hybridinteractive/craft-position-fieldtype": "5.0.0",
"craftpulse/craft-colour-swatches": "5.0.0",
"verbb/cp-nav": "5.0.0",
"craftcms/ckeditor": "4.0.6",
"verbb/hyper": "2.0.0",
"presseddigital/linkit": "5.0.0",
"craftcms/fix-fks": "2.1.0"