I am not aware of a means of making Nautilus (Files) do that. If you click the hamburger icon > Preferences - you will see that many options and settings have been removed.
I use Nemo File Manager instead. Nemo is a fork of Nautilus with the settings, options and preferences restored. In Nemo, click view
then for sidebar
select Tree
.
You can install with
sudo apt update && sudo apt install nemo
If you find that you prefer it, you can set is as your default File Manager (Note that the file picker is a different function than the file manager.)