I gave a downvote because i really think these solutions are "thin".
I think its a really bad idea to assume that the user knows the screen size, I would say that it is always best to assume that the user is "stupid".
To publish a version for different devices could be possible in some cases, but even if for example a version is for "mobile" only there are still a ton of screen sizes and resolutions.
I am not sure how
get_model_name() works on different devices, only tried it on desktop pc where it just returns "generic device" and therefor tells us absolutely nothing. Even if it returns the exact model it would still require to have a huge list of models and the respective screen size, and when new devices are in sales, we would have to update that list.
If it isn't for some very specific case, design your game to be responsive! One way or another.
Godot even have some build in methods of handling different screen sizes/resolutions