You specified the
s bit for the group without the
x bit. Executable and setgid are separate bits, the
ls command just combines them into a single letter to gain space. You need
chmod g=rwxs,u=rwx,o=rx folder_name
chmod 2775 folder_name. You did
chmod 2765 folder_name.
S means setxid without executable, it's in uppercase because that's rarely useful and likely a sign of a mistake that needs to be fixed.