Recalibrate _wp_attachment_metadata Image Dimensions

You can easily use Regenerate Thumbnails and bulk regenerate for all the images. Regenerate Thumbnail plugin updates all the details about the full size image, as well as it recreates thumbnail. It’ll update the dimension for each image, but all the other image sizes should be registered as well, else they won’t be stored in updated image meta.

If you want to just update the dimensions for the full size image, you can probably run a custom script.

Read the link you shared, and checked the code of Regenerate Thumbnail as well, the latest version don’t seem to rely on dimensions stored in image meta by WordPress, but for thumbnails, it definitely needs the image meta, all the image sizes should be registered