I'm kind of new to Proxmox so maybe someone else knows something I don't but I do not believe there is a way to control sorting in Proxmox.
What you are seeing is that first it is sorting the containers by ID and then the VMs by ID. So it is sorting by ID but it does it in two groups.
While you may not be able to make it sort differently you can change your naming behavior so that it appears to be sorting by ID across the board. What I have seen recommended is that you pick a different range of numbers for containers and VMs. For instance all containers are 100-199 and all VMs are 200-299.
Unfortunately there is also no easy way to rename things that I am aware of. If it's that important to you then you will have to create templates using what you have already created, destroy them and recreate them with new names using the template you made. At least that is the process for containers. VMs may be slightly different.