CyberPanel Redirect not working properly

I’m using CyberPanel for laravel projects and HTTP to HTTPS is not working as expected.
I’m using default cyberpanel rewrite generator

Rewrite Rules Added by CyberPanel Rewrite Rule Generator

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

End CyberPanel Generated Rules.

It works perfectly on but when I go to with http it doesn’t redirect to https.

It is only working in but not with