Firstly, you need to know how RPART works, it is a decision tree which works by building a tree based on the features available i.e, Trees (also called decision trees, recursive partitioning) are a simple yet powerful tool in predictive statistics. The idea is to split the co-variable space into many partitions and to fit a constant model of the response variable in each partition.
In case of regression, the mean of the response variable in one node would be assigned to this node.
The structure is similar to a real tree (from the bottom up): there is a root, where the first split happens. After each split, two new nodes are created (assuming we only make binary splits). Each node only contains a subset of the observations. The partitions of the data, which are not split any more, are called terminal nodes or leafs. This simple mechanism makes the interpretation of the model pretty easy. to explain it with an example.
Now coming to your scenario, as you have mentioned it has 400+ features, now it start with a target variable and then divides into 2 parts, and goes to feature 1 and divides based on the value present in it like 0 or 1(for example 0 on the left node and 1 on the right node) and then it goes on till the last feature(sometimes it might not go till last feature) like that literally 400+ levels are generated for each and every record(but not 400 everytime because some records are similar, so those records gets generalized). So now you imagine for 400+ features, 7000 records, how big the tree might become and how hard it would be to generalize the results. So RPART couldn't give any result.
Now, how did by using RF we achieved the results?
RF works as Ensemble of trees i.e., it splits the data at row level and column level by which the tree generated are small and it takes ensemble of all the trees and gives an average(other ways too like voting etc) of all the small trees.
Go through these links for better understanding of RPART, Link-1
Go through these links for better understanding of RandomForest, Link-2.
My suggestion to get better results using Rpart is possible by reducing the number of features by applying PCA or any Dimensionality Reduction algorithms.
Since you have obtained desired results using different algorithms so the above is for your understanding.
Do let me know if you have any additional questions.