Both are correct.
The choice may depend on the context, for example, avoid repeatedly using only が (or の)in the total sentence.
Ex)
1.あなたが言ったことが問題になっていますよ。
2.あなたの言ったことが問題になっていますよ。
Basically, all 4 sentences are correct. They are almost equally correct.
2 might be a little better than 1 because 2 avoids using が twice, but probably very few people notice it.
4 might be a little better than 3 because 4 avoids using の twice, but probably very few people notice it.