Remove widgets from titlebars in gnome

You can install gtk3-nocsd to achieve this.

sudo apt install gtk3-nocsd

Then restart your computer.

before

after

Image source: GitHub repo

Note that some apps may not look as good after installing gtk3-nocsd.