In the current version of ArcGIS Online (2023.3), layers with more than 500,000 vertices automatically have optimization layer drawing enabled. When disabling optimization on layers, it can take a considerable about of time. There is no prompt or warning that the process is not complete. Please add a warning or alert along the lines of "Disabling optimization can take several minutes. Editing is temporarily unavailable on the layer until optimization completes. Please do not close this page until the process has successfully completed."