An important distinction between みたいに and みたいな is that:
-
みたいに is (like) an adverb. It modifies either an adjective or a verb and is followed by a whole clause. If it is modifying an adjective usually the adjective directly follows みたいに, but when modifying a verb there may be other things after みたいに such as a subject or direct object for the verb.
-
みたいな is in it’s attributive form. This means it must have the noun that it is modifying immediately following it.
This might not be immediately clear by just looking at the list of structures on bunpro’s page for this grammar point. When bunpro says that something can be followed by a verb usually you are able to put more than just that verb.
This means that in your example みたいに is describing する even though it isn’t directly next to it.
Note: Even though the page for this grammar point says that みたいに can be followed by Verb/い-Adjective, I can easily find people using みたいに with な adjectives.