Karolis has given a nice construction involving grammars, I will add the alternative options given in your question, closure properties.
Let $\Sigma$ be the alphabet for your language. We take a copy $\bar\Sigma = \{ \bar a \mid a\in \Sigma\}$. Let $h : (\Sigma\cup\bar\Sigma)^* \to \Sigma^*$ be the morphism that removes bars: $h(a) = a$, $h(\bar a)=a$ for all $a\in\Sigma$. Let $g : (\Sigma\cup\bar\Sigma)^* \to \Sigma^*$ be the morphism that deletes barred letters: $g(a) = a$, $g(\bar a)=\varepsilon$ for all $a\in\Sigma$.
Then for $u\in\Sigma^*$, $h^{-1}(u)$ is the set of strings that result from $u$ by "barring" an arbitrary subset of letters in the string. In that we we select them for deletion. In the prefix operation we cannot delete arbitrary letters, by only suffixes. Thus we restrict the selection by intersection with a proper regular language:
$pref(L) = g( h^{-1}(L) \cap \Sigma^*\bar\Sigma^* )$.
Same approach for instance: language of subwords $g( h^{-1}(L) \cap \bar\Sigma^*\Sigma^*\bar\Sigma^* )$, delete every even letter in the string $g( h^{-1}(L) \cap ( (\Sigma\bar\Sigma)^* \cup (\Sigma\bar\Sigma)^*\Sigma ) )$.
Formally, any family of languages closed under morphisms, inverse morphisms, and intersection with regular languages is closed under prefix. Such a family is called cone or full trio. So also valid for regular languages and recursively enumerable languages.