I solved it by adding this code to the manifest.xml file
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
android:usesCleartextTraffic="true"
Then chased I found that Retrofit was unable to resolve the url with the VPN so everything worked with the ip address
and finally I modified the call in the interface
from so
@GET("Clients")
fun getClients(): Call<ClientList>
to
@GET("Clients/")
fun getClients(): Call<ClientList>