Change sqlmode mysql 8

OS type and version ubuntu 20.04
Webmin version Latest

Hi! I need to change the sqlmode and have found many sites about it but no one works. I also found an old post in docs but that did not work either. Can someone point me in the right direction or have the solution.
I need to take away only_full_group_by which is default in Mysql 8