Irrelevant of the language (SQL, Java, C++, etc) comparing values that are generally irrational such as doubles and date/times using equality is almost always going to be wrong. There is simply too many cases where the system will round (or truncate) values such that you won't get the correct result. The only time that it remotely makes sense to use pure equality is when comparing a truncated/rounded irrational to a whole number. In all other cases you should use relative comparisons instead. The problem you see here is that DATETIME and DATETIME2 are different formats. It would be like comparing a float to a double. It isn't going to work well for all values.
Why do you need to locate a row by a specific time down to the millisecond? This seems like a design problem to me. If you were building a UI that showed all entries for a given timeframe then you'd normally go for something higher like seconds or minutes and then you'd use a bounding expression (< > or BETWEEN in SQL). If you needed an absolute row you'd be using the PK of the table.
DECLARE @logs TABLE (LogId INT, LogTime DATETIME, LogTime2 DATETIME2)
DECLARE @count INT = 50
DECLARE @index INT = 0
DECLARE @now DATETIME = GETDATE()
while @index < @count
BEGIN
INSERT INTO @logs VALUES (@index + 1, DATEADD(MILLISECOND, 100 * @index, @now), DATEADD(MILLISECOND, 100 * @index, @now))
SET @index = @index + 1
END
SELECT @now
SELECT * FROM @logs
SELECT * FROM @logs WHERE LogTime BETWEEN DATEADD(second, -1, @now) AND DATEADD(second, 1, @now)
SELECT * FROM @logs WHERE LogTime2 BETWEEN DATEADD(second, -1, @now) AND DATEADD(second, 1, @now)