The ribbon icon order and displayed/hidden state is saved in the .obsidian/workspace.json file on desktop and in .obsidian/workspace-mobile.json on mobile.
Obsidian desktop uses only the first and Obsidian mobile uses only the second.
There may be a FR to combine them, but for now they are separate for desktop and mobile.