Use Find or replace in data table on your data table like this:

This will use regular expressions to find the values. The regex is "\n.+" which stands for a newline followed by any characters. So, essentially, matching everything that is not in the first line within any cell.
Set the action to "Find and replace" and use %''% as the value to replace matches with. This will effectively replace everything outside of the first line of each cell with an empty string. So, essentially, remove all of your duplicates.
Here's a snippet of the action you can copy and paste into your flow designer to have the action created for you:
Variables.FindOrReplaceInDataTable.ReplaceItemInDataTableWithRegexEverywhere DataTable: DataTable AllMatches: True ValueToFind: $'''\\n.+''' TextToReplaceWith: $'''%''%''' DataTableMatches=> DataTableMatches
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.