Question: When you hit  `⌘ command` + `T` in Xcode it will open new tab, but in the last position.

How can I change this behavior to be able to open new tab just next to the current active tab?

Answer: 
In Xcode 11 this is the default behavior now. `Cmd + T` opens a tab next the active one.
Go to Xcode Preferences -> Navigation -> Navigation Style -> Open in Place.