@_jims Thanks for the reply.
Actually, I had seen this [Unanswered] post from 2020 on this forum earlier. Move Application Windows to Named Desktop/Space
The OP had mentioned this problem in that Post
I too had this problem where apps move to wrong spaces if they are told to move to specific desktop spaces by the technique @_jims suggested. So I thought there was a solution for this using KM in 2024.
[Edit] Found out from this thread that @Airy posted above that Mission control automatically re-arranges spaces based on use. Seems that was causing the problem of apps opening in the wrong workspace.