Exactly 5 months later, I managed to identify the source of the problem. If there are others who have this problem, I am sharing the solution now. The source of the problem was caused by a meta tag on my Layout page. Exactly below;
<base href="https://mywebsite.com">
After I deleted it from my head tags, everything worked fine. I didn't even remember when I wrote this tag. It drove me crazy for 5 months.