I’ve seen in some situations absolute URLs being “forced” to http. You can turn off absolute URLs in the system configuration to use relative URLs, which will eliminate this problem.
Always best to use relative URLs if it all possible. Also absolute URLs should use the URL that you entered teh site with. So if you access the site with https://blah.com then links built as absolute, should also contain that same https://blah.com in their URLs.