You wrote : what I'm trying to achieve is that safari opens with a private window whenever opening a new window from the dock .
When you have already set private browsing settings in safari preferences > General > New private window , and when you press command + W the window will come down to the dock .
And again if you click on the safari icon that is yet open showing white dot beneath it , if you click on safari icon it will always open normal browsing window .
But , if you wish you can press shift + command + N keys on the keyboard to open private browsing window .
In this way , you have opened a normal browsing window , simultaneously a private browsing window and you can work / Browse on both windows , and if you view any subject in private browsing , the second normal browsing window will never know what you have browsed , as cookies are never saved in private browsing .
An article : Safari for Mac: Use Private Browsing windows in Safari