Plz see my prev answer in this same thread to understand the whole. Sorry for multiple answers
After further investigation, the issue was happening due to VS 2019 picks the latest patch(default behavior of VS) of .net core 2.2 which is 2.2.8 for me to publish the application. We can restrict this to a specific version of choice by using
<RuntimeFrameworkVersion>2.2.4</RuntimeFrameworkVersion>
See Here. This finally solved my issue even though the latest patch is not applied. I can build from any VS 2017 or VS 2019, both publish the application for .net core 2.2.0 runtime version