The P-value is in fact a function of the effect size and the standard error. You can calculate the z-score by dividing the beta by the standard error, then transform the z-score into p-value directly.
One problem with the standard error is that it is correlated with the minor allele frequency of the SNP. So if the MAF in the GWAS sample differs from those in the target data, using the standard error will introduce bias. On the other hand, if the MAF is similar between the two dataset, then using the standard error might help to improve the mdoel.