The order of my custom fields is not following descending or ascending order in my view, when Group by is selected in view formatting.
Custom fields are grouped by their field tag value, not by field name. This applies to any custom ticket, user, and organization fields. To change the order the fields are displayed within the view, the associated ticket field tag value will need to be updated.
For more information on updating custom field tag values, see the article: Understanding tags and ticket fields.