A320 Dont follow flight plan

In the past I experienced something similar in the beggining of the flight with the A320NX where it wouldn’t follow the AP after take off. Make sure performance data is entered correctly and try to stick for a while to what is indicated by the flight director before passing control over to the AP.