Gold holds near $4,000 as Fed rate risks cap gains from war premium