Hamantaschen just wouldn't pinch and hold tight
It seems Hamantaschen cookies unfolding and leaking is not an uncommon problem. Of course the flax egg substitution can very likely also contribute to the unfolding but here are some tips from someone who has been baking Hamantaschen cookies for a while.

Tips for Creating Perfect Hamantaschen


  1) Find a great dough recipe. Often, the problems people have with
  baking hamantaschen can be traced to an inferior dough. Here are two
  foolproof, tasty dough recipes that I highly recommend. They are easy
  to handle and shape, and they provide great results when baked:
  
  Dairy Free Hamantaschen Dough
  
  Buttery Hamantaschen Dough


Of course you can use your flax egg substituted in for the eggs that the recipes ask for.


  2) Roll your dough out to 1/8 inch thick (or less). You want your
  dough to be as thin as possible, while still being thick enough to
  maintain the cookie’s structure. 1/8 inch seems to be the magic
  number; sometimes I roll mine out even thinner than that. For a more
  doughy texture you can roll it thicker, but remember– the thicker the
  dough is, the harder it will be to handle and shape. Thick dough is
  also more prone to opening/spreading in the oven.
  
  3) Use a thick filling that won’t run/weep from the cookies while
  baking. Knowing the proper consistency of a hamantaschen filling takes
  experience, because each type of filling is slightly different.
  Poppyseed filling has a very different texture than fruit filling, for
  example. A good filling should be somewhat thick so that it doesn’t
  run. 
  
  4) Cut your hamantaschen dough in 3-inch circles (or larger) before
  filling and folding into triangles. Anything smaller than 3 inches
  will be difficult to fold around your chosen filling.
  
  5) Most fillings can be chilled before using to fill hamantaschen.
  I’ve found that fruit, poppy seed, and cream cheese-based fillings
  tend to be easier to work with when they’re chilled in the
  refrigerator. The chilling process thickens the fillings and makes
  them less sticky, which makes them easier to handle with when you’re
  assembling your hamantaschen. Not all fillings are helped by
  refrigeration, however– particularly chocolate-based fillings like
  Nutella, which will harden with prolonged refrigeration. Check your
  filling recipe to see if refrigeration is recommended.
  
  6) Do not overfill your hamantaschen. Use 1 teaspoon of filling per
  hamantaschen cookie. Do not use more than 1 teaspoon. However tempting
  it might be to put lots of delicious filling in the middle of your
  cookie, using more than 1 teaspoon can cause your hamantaschen to
  spread open and leak in the oven. 1 teaspoon is plenty, especially
  when you cut your dough circles to 3 inches… it’s the perfect amount
  of filling.
  
  7) Fold your triangles the right way! Using the proper folding method
  will help your hamantschen hold together and create a beautiful shape.




Please that the sides are folded down so that each "side" has an "end" that is above and an "end" that is below in the fashion of folding the top of a box. This will help in preventing the cookies from unfolding.

Also note in Step 5, to pinch each of the 3 corners gently but firmly.

Source: http://theshiksa.com/2012/03/01/how-to-make-perfect-hamantaschen/