Yes, this behavior is due to the "Content-Disposition" header which is responsible for telling the browser to download an attachment or to open it in the browser, by default this will be set to download any asset.
You can disable this in the Apache Sling Content Disposition Filter, but I would recommend using the Apache method to fix it instead.
You can find all the details:
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-6-5-asset-direct-link-...
http://www.sgaemsolutions.com/2019/10/aempdf-is-getting-downloded-instead-of.html
Esteban Bustamante