You have something else going on. RapidCart Pro is adding a query string to the end of the URL. That should work fine with the code I gave you but you’re not using the code above(it has been tested and works with query strings). I’m not seeing any redirects happening at all. No public_html like you show. No stripping of the www like what you wanted.
It could be that because you used 301 (permeant) with the old htaccess file they may very well be being cached. 301’s have no expiry date (why they are called permeant) so the can technically be cached forever.
The code you posted I just tested and doesn’t work to strip the www.
Might I suggest you double check the file placement and delete the .htaccess file you currently have. Copy and paste exactly what I have given you and try again. You might want to change the r=301 to r=302 until you are sure it works 100% of the time for every URL on the site. The change it back to the r=301.