@lenenkash
The following works for extracting vector FeatureService layers as GeoJSON from the ArcGIS REST Services Directory, when the standard download options aren't available.
At the foot of each layer page on the REST Services Directory ("/FeatureService/0", "/FeatureService/1" etc) there should be a 'Query' operation:
You can define your own query, but when I'm after everything I query for all OIDs >= 0 and include all fields. Change the format to GeoJSON and execute the 'GET' query. The results can be copied into a notepad and file extension changed to .geojson. Not a neat process, but works for one-offs.
Note: The query will only return records up to the maximum specified by the layer (MaxRecordCount) e.g., if it's 1,000 and I know there are 1,250 features - the query above will only return the first 1,000. I would need to perform another query with different search terms to get the last 250. The best query for this type of pagination would depend on the dataset itself, as OID will be less reliable - it may have jumps, so record 1,001 may not be OID 1001 etc.
This will only work for vector datasets - and my experience so far is only with FeatureServices, specifically. It may work with MapService layers, but I don't know for sure. I haven't had to extract rasters, but pretty sure there isn't an equivalent workflow like this for them.
Hope that helps.