.htaccess rules not acknowledged

I am trying to restrict a folder and its content via an .htaccess file placed in it, however no matter how I try to execute the Deny rules, it doesn’t work. I’ve also tried Rewrite rules, but still. I’ve even tried putting Deny from all in the main .htaccess of the website, just to see if it will restrict it, but it didn’t work. Am I doing something wrong?

Open Litespeed does not follow all .htaccess rules.
You should use redirects to limit access to a certain folder

Options +FollowSymlinks
RewriteEngine on
#ip to allow access
RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123
RewriteRule ^test/.*$ - [F,L]
#send to…
RewriteRule .? https://example.com [R=302,L]