magento2.3 – Size attribute doesn’t have any options

I encounter this issue before while using custom extension.

It is caused by the layout on product page there are multiple layout calls some by ajax some by other means before reload it will not show options because it is not refreshing that specific layout from where options are coming but on reload it will refresh all layouts on that page along with that layout thats why it is behaving like this.

hope this helps