I was reading some documentation and it seems it should be a best practice to put an underscore before the variables that must not be accessed outside the script they are declared in.
I am reviewing all my code and I’m not sure if it is a good idea to do it everywhere, I’ve done it in a long script, with a lot of such variables, and it seems less readable to me.
Also, why is no one following this best practice? I followed tons of tutorials, even the ones in the official Godot documentation are not respecting this rule.
Because mainly on already existing project you follow the code style, in order to easier find things in big project, most Godot users are solo or a small team, therefore everybody choses his own code style which he likes and thinks best fits for his project, if you do not know which best fits for you then you can follow the Google code style: Google Style Guides | styleguide and adapt it for your code
Wear the clothes you feel comfortable in. If it feels easier for you to do one thing and it works, keep doing it. You’ll find you can learn other ways to write code very easily after a while, so you are better off not worrying about it too much until you are working in a team and you have to agree a style.