Symlinked folder's $PWD is not the same as in CLI when double-clicking in Dolphin

Good day, ladies and gentlemen!

I noticed that a symlinked script of mine was resolving $PWD to the real path, so I did an experiment. I made a script having this code:

#!/bin/bash

tmpfile=$(mktemp --suffix=.tmpfile)
trap 'rm -f "$tmpfile"' EXIT
printf '
PWD: %s
pwd: %s
pwd -P: %s
' "$PWD" "$( pwd )" "$( pwd -P )" > "$tmpfile"
subl "$tmpfile"

Essentially, it creates a temporary file, writes pwd values in it and opens it in Sublime Text.
Incidentally, I discovered that while Sublime Text, Textadept, and Featherpad have no issues, Kate is not able to open the temporary file, maybe because it detects its removal. But I do not use Kate, I was just attempting to remain in the KDE ecosystem for the experiment.

Then I made both a copy and a symlink of the script and placed them in a symlinked folder.
It turned out that both the copy and the symlink behave the same way.

Then, when I open a Konsole window inside the /media/do/tmp/.tmp symlinked folder and run either of them, I get the expected

PWD: /media/do/tmp/.tmp
pwd: /media/do/tmp/.tmp
pwd -P: /media/dev/tmp

i.e. the real path only when asked specifically for it (/media/dev/tmp is the real path).
When I open a Dolphin window in the /media/do/tmp/.tmp symlinked folder and double-click either of them I get

PWD: /media/dev/tmp
pwd: /media/dev/tmp
pwd -P: /media/dev/tmp

i.e. the real path regardless of being requested for.

My questions:

  1. Is it happening because I am doing/setting up something wrong?
  2. Is there a way to get the CLI behaviour (not following the symlink unless asked) when launching a script in Dolphin?

Thank you for your time and patience!

I suspect some will question the need for this: well, it messes up my development flow, because is relying on project paths and I made the symlinks specifically to avoid navigating every time to the very structured and buried-among-its-siblings real path. So I need the symlinked folder to be the context for everything I do inside it.

Oh, and the system info:


Operating System: Manjaro Linux 
KDE Plasma Version: 6.7.3
KDE Frameworks Version: 6.28.0
Qt Version: 6.11.1
Kernel Version: 6.18.40-2-MANJARO (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i3-4170 CPU @ 3.70GHz
Memory: 17 GB of RAM (16.7 GB usable)
Graphics Processor 1: NVIDIA GeForce GT 730/PCIe/SSE2
Graphics Processor 2: NVIDIA GeForce GT 730/PCIe/SSE2
Graphics Processor 3: Unknown