Then you probably have something in your router/Pi that translates the duckdns address to the local IP.
If you setup duckdns, your internal URL can’t be http, only https,unless you have a reverse proxy.
You will probably find you have trouble with the companion app as it might not like Https with an invalid certificate. If so set up nginx as a reverse proxy, (I posted a guide for this).
That way you can connect securely from outside Https duckdns etc
Then inside your network it’s straight http, the app can choose to use that when your connected to your home wifi