This group is for the Genomic SEM analytic framework and software, as introduced in this paper:
Grotzinger, A. D., Rhemtulla, M., de Vlaming, R., Ritchie, S. J., Mallard, T. T., Hill, W. D, Ip, H. F., Marioni, R. E., McIntosh, A. M., Deary, I. J., Koellinger, P. D., Harden, K. P., Nivard, M. G., & Tucker-Drob, E. M. (2019). Genomic structural equation modelling provides insights into the multivariate genetic architecture of complex traits. Nature Human Behaviour, 3, 513-525. [Nivard & Tucker-Drob jointly directed this work] Paper Supplement(Text/Figures) Supplement(Tables) GenomicSEM software
You shouldn't create factors from PGIs unless they are derived from fully independent discovery samples (in which case see my bioRxiv paper below). If they are from overlapping samples, then shared estimation error across the original GWASs will induce correlations among the PGIs that do not reflect shared genetic etiology.
In PGI analysis, best practice is indeed to correct for PCs at both the discovery and the prediction stages.
Regular SEM questions have come up on this group from time to time, so you can search the history, but we try to keep this group focused on Genomic SEM.
Tucker-Drob, E. M. (2017). Measurement error correction of genome-wide polygenic scores in prediction samples. bioRχiv. Link (to preprint)