Why is g4 the best move in this Queens Gambit accepted line? Doesn't the extra tempo not make up for the lack of king safety?
[FEN &quot;r2q1rk1/1pp1ppbp/p1n2np1/5b2/P1BP4/2N1PN1P/1P3PP1/R1BQ1RK1 w - - 0 1&quot;]
I suppose you have some source that claims 1.g4 is the best move from the diagram position, but which doesn't give any reason for it. I won't try to weigh in on whether it is in fact the best move here, but I will try to articulate a reason or two to play it. First I'll say that I don't think it's the tempo against the bishop that offsets the decreased king safety, but rather other tangible results instead.

To my eye, the primary point in its favor is that White gets one of two potentially desirable outcomes immediately: either (1) Black moves her bishop away from controlling e4, so White gets in the move 2.e4 next, building a nice central pawn duo, or (2) Black responds with 1...Be4, and allows a forcing line that lets White obtain two minor pieces for rook and pawn. (I'll note that my first thought in responding to 1...Be4 was simply to win the bishop pair for White, but that ultimately doesn't look that great, and it was some nudging from Stockfish that revealed this other idea to me.)

The annotations that follow look at these two resulting possibilities in a little bit of detail, offering my scant takes on matters. But I'll note that there are a lot of concrete, tactical ideas in the air here, and the overall situation is more chaotic than I initially thought when first looking at the position.

[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "*"]
[FEN "r2q1rk1/1pp1ppbp/p1n2np1/5b2/P1BP4/2N1PN1P/1P3PP1/R1BQ1RK1 w - - 0 1"]

1.g4 
    {Lessening Black's control of the e4 square by putting the question to
    the bishop.}
1...Bd7 
    ( 1...Be4 {Trying to stop White's central expansion, but it allows 
    White to force the obtaining of two pieces for a rook and pawn if he 
    so chooses.} 2.Nd2 $1 Bd5 {Forced.} 3.g5 $1 Bxc4 {Forced,} 4.gxf6 Bxf1
    {Forced.} 5.fxg7 Kxg7 6.Kxf1 {White's larger piece army offers the 
    better prospects, and the airy castle around his king isn't an 
    immediate concern, and with proper play shouldn't be an issue.} )
2.e4 
    {Establishing an ideal pawn center, though yes at the expense of 
    having created a good deal of space around the white king. In fact, 
    Black can (and perhaps should) now sacrifice a piece for pawns and 
    greater exposure of the white king.}
2...Nxg4 
    ( 2...h5 {Another attempt to further expose the white king.} 3.e5 {
    This basically forces Black to go in for the same sort of piece 
    sacrifice as in the 2.e4 Nxg4 line given here.} 
        ( 3.Nh4 $5 {Another interesting possibility, exploiting the fact 
        that the only non-pinned pawn defending g6 has now advanced.} 3...
        hxg4 $2 4.Nxg6 )
    3...hxg4 
        ( 3...Nh7 $2 4.gxh5 gxh5 5.Kh2 {Now the white king is no more 
        exposed than the black king, and White will be the one with the 
        better attack.} )
    4.exf6 Bxf6 5.hxg4 Bxg4 6.Qd3 {Threatening Qxg6. Again I'd wager that 
    White's extra piece outweighs the deficit in pawns and the exposed 
    king.} )
3.hxg4 Bxg4 4.Be2 Bxf3 5.Bxf3 Nxd4 6.Bg2 
    {Black has three pawns for the piece, and has removed much of the 
    white king's pawn cover. Nevertheless, Black does not have an 
    attacking force at the ready immediately, and I think the long term 
    chances should favor White's extra piece.}
*