The queue an application gets submitted to is defined by the placement policy in the FS. The placement policy returns the queue and the application object is updated. When an application is stored in the state store the application submission context is used which has not been updated after the placement rules have run.
This means that the original queue from the submission is still stored which is the incorrect queue. On restore we then read back the wrong queue and display the wrong queue in the RM web UI.
We should update the submission context after we have run the placement policies to make sure that we store the correct queue for the application.