Since the target and obstacles position constantly changing, you need to re-calculate and find a new path more frequently, maybe every 1-2 seconds.
This may cause performance issues if the map is too big or cells are too small. In case native Pathfinding is too slow, you can try EasyStarJS plugin, here is C3 version:
github.com/erenertugrul/construct-plugins/tree/master/ported_plugins/behaviors/easystarjs
EasyStar is very fast and it has a few cool features like directional cells - where cells are walkable in one direction and blocked in another.