Applied the changes made by Jarv for fixing the inconsistent data in the dropdown when editing, as per checking the changes, the loading of the data in the dropdown is called when the javascript is executed, and put the loading of the modal when the ajax is complete, tested the changes, and it is OK. Pushed the changes on git and pulled it into pre-prod for testing, as the changes regarding this issue are fixed on my local, but not working on pre-prod, but when checked, it is now working. Checked other changes on the pre-prod while on it, and as per checking, it is OK, all is applied and working.