Let's Encrypt SSL Issue on existing virtual server (domain)

I discovered why I’m unable to issue a Let’s encrypt certificate for test.domain.ext:
on this domain there is a folder where the CMS Grav is installed.

public_html/grav/

The .htaccess rule present in public_html/

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/grav/
RewriteRule ^(.*)$ /grav/$1

forbid access to the public_html/.well-known/acme-chachallenge

So if I disable manually the .htaccess file I’m able to issue the SSL certificate then I need to resume back the .htaccess file but now I think I will have issue when the auto SSL certificate will try to renew.

How to avoid this issue?

Seems I have to add at very start of the .htaccess file the following rule:

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^\.well-known/.+ - [END]

So if the request will match the folder .well-known this will allow access and stop all other htaccess rules.