We finally solved the issue. The problem was the dtexec.exe for that version of SQL 2017 that was causing the issue of slow throughput when invoked by agent job. Two solutions were tried, either apply the latest CU(not available when I had the issue) or force SQL Server to use a specific version of DTEXEC which has been known to work well. Microsoft engineer said it probably is a bug and he will report it.
I hope it helps someone in future.
Please note that windows version had no role to play here as I was suspecting earlier.