Hello @v-xida-msft
first and foremost thank you for your help and response.
I got it working with your formular and the filter function. To confirm that it is a GUID I use a regex.
If(IsMatch(TextSearchBox1.Text,"^[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}$"),
SortByColumns(Filter(TABLE, StartsWith(TextSearchBox1.Text,guid)),"guid",If(SortListVAR,Descending,Ascending)),SortByColumns(TABLE, TextSearchBox1.Text, "primaryname"), "primaryname", If(SortListVAR, Descending, Ascending)))With this I search for a GUID in the "subtitle" or a normal name in the main title.
So as this is working I get a "delegation error" because of the StartsWith function.
It says "Part of this formula cannot be evaluated remotely. the 'StartsWith' function cannot be delegated if a field name appears in the second argument."
Also this.

Regardig it I read: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview
Is there an alternative for the StartsWith function in this matter?
Also the error I described existed only on the Search function
SortByColumns(Search(TABLE,TextSearchBox1.Text,"guid"), "guid",If(SortListVAR, Descending, Ascending))
It had no impact changing the length of the field value. Also it is a CDS entity in the Production environment not the Trial.
If I use this code I also get the message:

So all in all thank you it works for now so far 😃 But I might get into trouble with larger data sets.