The OP does not state laptop/portable. I took a WAG thinking it was desktop. (still don't know).
Your way will at least show the library if the external is not attached. However, everything ends up with the dreaded ! .
Then the problem comes when the external is reattached, especially if there were files added without it attached.
😟
Moving the media folder to a different location should not interfere with your syncing, as long as you point iTunes again to the new location of the library.
Underlined statement is the issue.
The iTunes media folder is not the iTunes library. Pointing iTunes prefs - Advanced to this location again may or may not fix it. Usually not.
iTunes library = iTunes folder and all media, wherever it is located. You can have items in iTunes that are not in the iTunes media folder.
iTunes media folder = items added to iTunes with Copy files to iTunes media folder when organized is ticked and also all purchased items (unless you moved them elsewhere). If you consolidate the library, everything will get copied to the iTunes media folder
It can get very complicated which is why I simply recommend to move the entire /Music/iTunes/ folder.