when you're on site XYZ, the URL most probably should point to XYZ.
However this is not quite accurate, as it misunderstands the semantic meaning of the
url property in Schema.org structured data. For a Schema.org
Thing (like an
url property should always point to the same URL, because every
Thing has exactly one preferred, or canonical, URL.
The short answer is that you should always use the desktop version of your page in structured data, because in your case the desktop version of the page is also the canonical version.
For each of your articles (and any URL on the internet), only one URL can be the canonical URL, and this rule applies the same to structured data as it does for "normal" web pages. The canonical URL is the URL that you want to show up in search engines and social media, the URL you want everyone to land on if they are entering your website, and the URL that you would prefer outside sources to link visitors to.
The mobile version of your article (
site.m.domain) is separate from your canonical page - it is considered an alternate resource representation, and should be tagged to search engines as such:
Annotations for desktop and mobile URLs
To help our algorithms understand separate mobile URLs, we recommend using the following annotations:
On the desktop page, add a special
link rel="alternate" tag pointing to the corresponding mobile URL. This helps Googlebot discover the location of your site’s mobile pages.
On the mobile page, add a
link rel="canonical" tag pointing to the corresponding desktop URL.
Annotations in the HTML
On the desktop page (http://www.example.com/page-1), add:
<link rel="alternate" media="only screen and (max-width: 640px)" href="http://m.example.com/page-1">
and on the mobile page (http://m.example.com/page-1), the required annotation should be:
<link rel="canonical" href="http://www.example.com/page-1">
This rel="canonical" tag on the mobile URL pointing to the desktop page is required.
Separate URLs - Google Developers
Schema.org Structured Data
So what about Schema.org structured data? Basically, it should be treated using the same rules above.
url field of the structured data has effectively the same semantic meaning as the
canonical tag - it describes the most unambiguous representation of a
Thing. If a crawler needs any alternate resource representations, it will be able to visit your canonical url and parse them from your
link rel="alternate" tags. So the solution is to always use your desktop page - the canonical page - in the structured data.