It sounds like /folder exists in your web root. Since you haven't sent Apache a slash-terminated URL, and the requested resource is a folder, the DirectorySlash directive forces a redirect to the corrected URL.
Unfortunately, mod_rewrite has a go at your request before this redirect occurs, and while it doesn't change the URI that is used in generating the redirect, the changes that it makes to the query string are not separated in a way that mod_dir knows not to include them. Therefore, when the redirect is sent back to the browser, it includes the query string generated by your RewriteRule.
A potential solution to this (other than turning off DirectorySlash, which is not recommended for the reasons listed in the documentation) is to perform mod_dir's work for it as part of your rule set:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{HTTPS}s ^on(s)|off
RewriteRule [^/]$ http%1://%{HTTP_HOST}%{REQUEST_URI}/ [R=301,L]
RewriteRule ^(.*)$ framework/index.php?framework=$1 [QSA,L]